aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/controllers/system.js
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-05-14 10:26:55 +0200
committerDennis Eriksen <dennis.se@gmail.com>2013-05-14 10:26:55 +0200
commit16d9bc503bcbed5b9900e9e403bdd35022386c9d (patch)
tree94b13369ced2d2f2ae7e14d6299c64f4579d6593 /controllers/system.js
parentadded access priveliges in comments, so we know what they mean (diff)
downloadDivid-16d9bc503bcbed5b9900e9e403bdd35022386c9d.tar.gz
updated the checkAccess-function to include permissions, and updated
adminpermissions to 9.
Diffstat (limited to 'controllers/system.js')
-rw-r--r--controllers/system.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/controllers/system.js b/controllers/system.js
index 462641f..21e367e 100644
--- a/controllers/system.js
+++ b/controllers/system.js
@@ -169,7 +169,7 @@ exports.postProjectPost = function(req, res) {
if (err) return res.status(500).render('error', { title: '500', text: 'En serverfeil oppstod', error: err.stack });
// check if access
- Access.checkAccess(req.user._id, project._id, function(err, access) {
+ Access.checkAccess(req.user._id, project._id, 0, function(err, access) {
if (err || !access) return res.status(403).render('error', { title: '403', text: 'no sir.' });
// Time to fill in the model!
@@ -210,7 +210,7 @@ exports.postNewProject = function(req, res) {
access.user = req.user._id;
access.creator = req.user._id;
access.project = project._id;
- access.permissions = 1;
+ access.permissions = 9;
access.save(function(err) {
if (err) {
console.log(err.errors);