fixed bug in privileges system, thanks TravisCI!

v1.18.x
Julian Lam 11 years ago
parent 759775ecbe
commit b5d4e62e70

@ -101,7 +101,7 @@ module.exports = function(Topics) {
categoryTools.privileges(cid, uid, next); categoryTools.privileges(cid, uid, next);
}, },
function(privileges, next) { function(privileges, next) {
if(!privileges['topics:create']) { if(!privileges.meta['topics:create']) {
return next(new Error('[[error:no-privileges]]')); return next(new Error('[[error:no-privileges]]'));
} }
next(); next();
@ -177,7 +177,7 @@ module.exports = function(Topics) {
}, },
function(privilegesData, next) { function(privilegesData, next) {
privileges = privilegesData; privileges = privilegesData;
if (!privileges.write) { if (!privileges.meta['topics:reply']) {
return next(new Error('[[error:no-privileges]]')); return next(new Error('[[error:no-privileges]]'));
} }
next(); next();

Loading…
Cancel
Save