Remove implicit mod privs. closes #6345 (#7648)

* feat: add upgrade script to give mods privs

* feat: give all privileges when making a moderator

* feat: remove implicit privs

* feat: give global mods default privs

* feat: more priv fixes

* feat: use lodash

* fix: remove implicit mod priv from topic delete

* fix: more privs

* fix: posts.canEdit

* fix: canDelete and canEdit

* fix: tests, remove console.log

* feat: shorter functions

* feat: add tests

* fix: uids

* fix: redis random test fail
This commit is contained in:
Barış Soner Uşaklı
2019-05-30 19:30:47 -04:00
committed by GitHub
parent ebb32e7891
commit 035f624758
15 changed files with 319 additions and 227 deletions

View File

@@ -397,6 +397,9 @@ function giveGlobalPrivileges(next) {
function (next) {
privileges.global.give(defaultPrivileges, 'registered-users', next);
},
function (next) {
privileges.global.give(defaultPrivileges.concat(['ban', 'upload:post:file']), 'Global Moderators', next);
},
function (next) {
privileges.global.give(['view:users', 'view:tags', 'view:groups'], 'guests', next);
},