mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 10:35:55 +01:00
privilege cleanup
This commit is contained in:
@@ -53,13 +53,13 @@ module.exports = function(privileges) {
|
||||
});
|
||||
};
|
||||
|
||||
privileges.posts.canRead = function(pid, uid, callback) {
|
||||
privileges.posts.can = function(privilege, pid, uid, callback) {
|
||||
posts.getCidByPid(pid, function(err, cid) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
privileges.categories.canRead(cid, uid, callback);
|
||||
privileges.categories.can(privilege, cid, uid, callback);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user