fix: dont let mods load postqueue for a cid they are not a mod of

v1.18.x
Barış Soner Uşaklı 4 years ago
parent 2ea9768e00
commit 7bf6d3b8eb

@ -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));
});

Loading…
Cancel
Save