mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 11:11:04 +01:00
fix: privileges added by plugins (#9802)
* fix: privileges added by plugins when copying a categories privileges, privileges added by plugins will be copied as well when purging a category privileges added by plugins will be purged as well show plugin privileges in privileges.<categories/admin/global>.get show plugin privileges in privileges.<categories/admin/global>.userPrivileges show plugin privileges in privileges.<categories/admin/global>.groupPrivileges * fix: typo
This commit is contained in:
committed by
GitHub
parent
506035b5f7
commit
3ecbb624d8
@@ -48,7 +48,8 @@ module.exports = function (Categories) {
|
||||
`cid:${cid}:tag:whitelist`,
|
||||
`category:${cid}`,
|
||||
]);
|
||||
await groups.destroy(privileges.categories.privilegeList.map(privilege => `cid:${cid}:privileges:${privilege}`));
|
||||
const privilegeList = await privileges.categories.getPrivilegeList();
|
||||
await groups.destroy(privilegeList.map(privilege => `cid:${cid}:privileges:${privilege}`));
|
||||
}
|
||||
|
||||
async function removeFromParent(cid) {
|
||||
|
||||
Reference in New Issue
Block a user