mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-22 07:23:01 +01:00
fixed bug in privileges system, thanks TravisCI!
This commit is contained in:
@@ -101,7 +101,7 @@ module.exports = function(Topics) {
|
||||
categoryTools.privileges(cid, uid, next);
|
||||
},
|
||||
function(privileges, next) {
|
||||
if(!privileges['topics:create']) {
|
||||
if(!privileges.meta['topics:create']) {
|
||||
return next(new Error('[[error:no-privileges]]'));
|
||||
}
|
||||
next();
|
||||
@@ -177,7 +177,7 @@ module.exports = function(Topics) {
|
||||
},
|
||||
function(privilegesData, next) {
|
||||
privileges = privilegesData;
|
||||
if (!privileges.write) {
|
||||
if (!privileges.meta['topics:reply']) {
|
||||
return next(new Error('[[error:no-privileges]]'));
|
||||
}
|
||||
next();
|
||||
|
||||
Reference in New Issue
Block a user