mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-08 14:23:04 +02:00
fix: #12389, update privilege group check
This commit is contained in:
@@ -56,7 +56,7 @@ Groups.removeEphemeralGroups = function (groups) {
|
||||
return groups;
|
||||
};
|
||||
|
||||
const isPrivilegeGroupRegex = /^cid:(?:\d+|admin):privileges:[\w\-:]+$/;
|
||||
const isPrivilegeGroupRegex = /^cid:(?:-?\d+|admin):privileges:[\w\-:]+$/;
|
||||
Groups.isPrivilegeGroup = function (groupName) {
|
||||
return isPrivilegeGroupRegex.test(groupName);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user