mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-15 10:16:12 +01:00
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:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user