added filterUids method to privileges

used to filter uids on a single category
This commit is contained in:
barisusakli
2014-09-09 15:19:57 -04:00
parent 493d0dea1e
commit 4e6719e0aa
8 changed files with 114 additions and 23 deletions

View File

@@ -275,11 +275,7 @@ var async = require('async'),
return;
}
async.filter(followers, function(uid, next) {
privileges.categories.can('read', results.topic.cid, uid, function(err, canRead) {
next(!err && canRead);
});
}, function(followers) {
privileges.categories.filterUids('read', results.topic.cid, followers, function(followers) {
if (!followers.length) {
return;
}