mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-03 13:19:51 +01:00
more updates to privileges revamp
This commit is contained in:
@@ -77,7 +77,7 @@ categoriesController.get = function(req, res, next) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
if (!categoryPrivileges.read) {
|
||||
if (!categoryPrivileges.meta.read) {
|
||||
next(new Error('[[error:no-privileges]]'));
|
||||
} else {
|
||||
next(null, categoryPrivileges);
|
||||
|
||||
@@ -71,7 +71,7 @@ Controllers.home = function(req, res, next) {
|
||||
|
||||
function canSee(category, next) {
|
||||
categoryTools.privileges(category.cid, ((req.user) ? req.user.uid || 0 : 0), function(err, privileges) {
|
||||
next(!err && privileges.read);
|
||||
next(!err && privileges.meta.read);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user