new privilege: Access Topic

differentiation between Access Category and Access Topic, ie. allows you
to see the category view but not actually enter the topic itself
This commit is contained in:
psychobunny
2016-05-28 05:41:17 -04:00
parent 839ff06967
commit b37b083a4d
8 changed files with 29 additions and 14 deletions

View File

@@ -50,7 +50,7 @@ topicsController.get = function(req, res, callback) {
userPrivileges = results.privileges;
if (!userPrivileges.read || (parseInt(results.topic.deleted, 10) && !userPrivileges.view_deleted)) {
if (!userPrivileges.read || !userPrivileges['topics:read'] || (parseInt(results.topic.deleted, 10) && !userPrivileges.view_deleted)) {
return helpers.notAllowed(req, res);
}