diff --git a/public/src/modules/helpers.js b/public/src/modules/helpers.js index 0abd12bc1b..b46d5238a7 100644 --- a/public/src/modules/helpers.js +++ b/public/src/modules/helpers.js @@ -182,9 +182,11 @@ return states.map(function (priv) { var guestDisabled = ['groups:moderate', 'groups:posts:upvote', 'groups:posts:downvote', 'groups:local:login', 'groups:group:create']; var spidersEnabled = ['groups:find', 'groups:read', 'groups:topics:read', 'groups:view:users', 'groups:view:tags', 'groups:view:groups']; + var globalModDisabled = ['groups:moderate']; var disabled = (member === 'guests' && guestDisabled.includes(priv.name)) || - (member === 'spiders' && !spidersEnabled.includes(priv.name)); + (member === 'spiders' && !spidersEnabled.includes(priv.name)) || + (member === 'Global Moderators' && globalModDisabled.includes(priv.name)); return ''; }).join(''); diff --git a/src/categories/create.js b/src/categories/create.js index e736a40acb..2ffb57d252 100644 --- a/src/categories/create.js +++ b/src/categories/create.js @@ -71,7 +71,6 @@ module.exports = function (Categories) { const modPrivileges = defaultPrivileges.concat([ 'posts:view_deleted', 'purge', - 'moderate', ]); async.series([ diff --git a/src/upgrades/1.12.3/give_mod_privileges.js b/src/upgrades/1.12.3/give_mod_privileges.js index 7cf113803d..f80dc7e119 100644 --- a/src/upgrades/1.12.3/give_mod_privileges.js +++ b/src/upgrades/1.12.3/give_mod_privileges.js @@ -26,7 +26,6 @@ module.exports = { const modPrivileges = defaultPrivileges.concat([ 'posts:view_deleted', 'purge', - 'moderate', ]); const globalModPrivs = [ diff --git a/test/categories.js b/test/categories.js index 16db481f4f..334697da86 100644 --- a/test/categories.js +++ b/test/categories.js @@ -849,9 +849,9 @@ describe('Categories', function () { it('should retrieve all users with moderator bit in category privilege', function (done) { Categories.getModeratorUids([1, 2], function (err, uids) { assert.ifError(err); - assert.strictEqual(2, uids.length); + assert.strictEqual(uids.length, 2); assert(uids[0].includes('1')); - assert.strictEqual(1, uids[1].length); + assert.strictEqual(uids[1].length, 0); done(); }); });