privilege cleanup

This commit is contained in:
barisusakli
2014-05-17 18:59:34 -04:00
parent ff2bad635c
commit 472e6b5206
10 changed files with 29 additions and 84 deletions

View File

@@ -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);
});
};