added privileges.topics.filterUids

if a topic is deleted and user doesn't have permissions/admin/mod dont
send notifs
This commit is contained in:
barisusakli
2015-04-18 16:34:32 -04:00
parent 8ee40ece71
commit b7b44e13b1
6 changed files with 50 additions and 7 deletions

View File

@@ -117,7 +117,7 @@ module.exports = function(Topics) {
return callback();
}
privileges.categories.filterUids('read', postData.topic.cid, followers, next);
privileges.topics.filterUids('read', postData.topic.tid, followers, next);
},
function(_followers, next) {
followers = _followers;

View File

@@ -44,7 +44,7 @@ module.exports = function(Topics) {
}).slice(0, count).map(function(topic) {
return topic.tid;
});
privileges.topics.filter('read', tids, uid, next);
privileges.topics.filterTids('read', tids, uid, next);
},
function(tids, next) {
Topics.getTopicsByTids(tids, uid, next);

View File

@@ -114,7 +114,7 @@ module.exports = function(Topics) {
async.waterfall([
function(next) {
privileges.topics.filter('read', tids, uid, next);
privileges.topics.filterTids('read', tids, uid, next);
},
function(tids, next) {
Topics.getTopicsFields(tids, ['tid', 'cid'], next);