mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
feat: add privilege give/rescind hooks (#8336)
* feat: add privilege give/rescind hooks action:privileges.categories.give/rescind action:privileges.global.give/rescind breaking change, privileges.categories.give/rescind and privileges.global.give/rescind use full privilege name for groups ie `groups:find` instead of `find` * fix: tests, privileges renamed
This commit is contained in:
committed by
GitHub
parent
a0e243eea1
commit
ec5582b53c
@@ -213,11 +213,12 @@ async function setupDefaultConfigs(meta) {
|
||||
async function giveDefaultGlobalPrivileges() {
|
||||
const privileges = require('../../src/privileges');
|
||||
await privileges.global.give([
|
||||
'chat', 'upload:post:image', 'signature', 'search:content',
|
||||
'search:users', 'search:tags', 'local:login', 'view:users', 'view:tags', 'view:groups',
|
||||
'groups:chat', 'groups:upload:post:image', 'groups:signature', 'groups:search:content',
|
||||
'groups:search:users', 'groups:search:tags', 'groups:local:login', 'groups:view:users',
|
||||
'groups:view:tags', 'groups:view:groups',
|
||||
], 'registered-users');
|
||||
await privileges.global.give([
|
||||
'view:users', 'view:tags', 'view:groups',
|
||||
'groups:view:users', 'groups:view:tags', 'groups:view:groups',
|
||||
], 'guests');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user