From 16d9bc503bcbed5b9900e9e403bdd35022386c9d Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Tue, 14 May 2013 10:26:55 +0200 Subject: updated the checkAccess-function to include permissions, and updated adminpermissions to 9. --- controllers/system.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'controllers/system.js') 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); -- cgit v1.2.3