mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: dont let mods load postqueue for a cid they are not a mod of
This commit is contained in:
@@ -213,7 +213,9 @@ modsController.postQueue = async function (req, res, next) {
|
||||
categories.buildForSelect(req.uid, 'find', ['disabled', 'link', 'slug']),
|
||||
helpers.getCategoriesByStates(req.uid, cid, null, 'moderate'),
|
||||
]);
|
||||
|
||||
if (!moderatedCids.includes(String(cid)) && !isAdminOrGlobalMod) {
|
||||
return next();
|
||||
}
|
||||
allCategories.forEach((c) => {
|
||||
c.disabledClass = !isAdminOrGlobalMod && !moderatedCids.includes(String(c.cid));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user