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
@@ -655,7 +655,7 @@ describe('Flags', function () {
|
||||
it('should not allow flagging post in private category', async function () {
|
||||
const category = await Categories.create({ name: 'private category' });
|
||||
|
||||
await Privileges.categories.rescind(['topics:read'], category.cid, 'registered-users');
|
||||
await Privileges.categories.rescind(['groups:topics:read'], category.cid, 'registered-users');
|
||||
const result = await Topics.post({
|
||||
cid: category.cid,
|
||||
uid: adminUid,
|
||||
|
||||
Reference in New Issue
Block a user