mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 10:45:55 +02:00
fix: restore global privilege hooks
This commit is contained in:
@@ -101,18 +101,18 @@ module.exports = function (privileges) {
|
||||
|
||||
privileges.global.give = async function (privileges, groupName) {
|
||||
await helpers.giveOrRescind(groups.join, privileges, 0, groupName);
|
||||
// plugins.fireHook('action:privileges.global.give', {
|
||||
// privileges: privileges,
|
||||
// groupNames: Array.isArray(groupName) ? groupName : [groupName],
|
||||
// });
|
||||
plugins.fireHook('action:privileges.global.give', {
|
||||
privileges: privileges,
|
||||
groupNames: Array.isArray(groupName) ? groupName : [groupName],
|
||||
});
|
||||
};
|
||||
|
||||
privileges.global.rescind = async function (privileges, groupName) {
|
||||
await helpers.giveOrRescind(groups.leave, privileges, 0, groupName);
|
||||
// plugins.fireHook('action:privileges.global.rescind', {
|
||||
// privileges: privileges,
|
||||
// groupNames: Array.isArray(groupName) ? groupName : [groupName],
|
||||
// });
|
||||
plugins.fireHook('action:privileges.global.rescind', {
|
||||
privileges: privileges,
|
||||
groupNames: Array.isArray(groupName) ? groupName : [groupName],
|
||||
});
|
||||
};
|
||||
|
||||
privileges.global.userPrivileges = async function (uid) {
|
||||
|
||||
Reference in New Issue
Block a user