From 1b2da78fd80b4d7b18d3910bbb240e56b47af494 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 11 Apr 2015 16:50:55 -0400 Subject: [PATCH] missing lines --- src/privileges/topics.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/privileges/topics.js b/src/privileges/topics.js index 0f4a9babdb..174c078efc 100644 --- a/src/privileges/topics.js +++ b/src/privileges/topics.js @@ -80,6 +80,7 @@ module.exports = function(privileges) { var cids = topicsData.map(function(topic) { return topic.cid; }).filter(function(cid, index, array) { + return cid && array.indexOf(cid) === index; }); async.parallel({ @@ -102,6 +103,7 @@ module.exports = function(privileges) { var isModOf = {}; cids = cids.filter(function(cid, index) { isModOf[cid] = results.isModerators[index]; + return !results.categories[index].disabled && (results.allowedTo[index] || results.isAdmin || results.isModerators[index]); });