mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: isPrivilegeGroup not capturing admin privileges
This commit is contained in:
@@ -55,7 +55,7 @@ Groups.removeEphemeralGroups = function (groups) {
|
|||||||
return groups;
|
return groups;
|
||||||
};
|
};
|
||||||
|
|
||||||
const isPrivilegeGroupRegex = /^cid:\d+:privileges:[\w\-:]+$/;
|
const isPrivilegeGroupRegex = /^cid:(?:\d+|admin):privileges:[\w\-:]+$/;
|
||||||
Groups.isPrivilegeGroup = function (groupName) {
|
Groups.isPrivilegeGroup = function (groupName) {
|
||||||
return isPrivilegeGroupRegex.test(groupName);
|
return isPrivilegeGroupRegex.test(groupName);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user