Skip to content

Commit

Permalink
fix: #12389, update privilege group check
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Mar 5, 2024
1 parent 22c225c commit 87a7905
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/groups/index.js
Expand Up @@ -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);
};
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/hooks.js
Expand Up @@ -233,7 +233,7 @@ function hookHandlerPromise(hook, hookObj, params) {
if (hook.startsWith('filter:') && returned !== undefined) {
_resolve(returned);
} else if (hook.startsWith('static:') && hookObj.method.length <= 1) {
// make sure it is resolved if static hook doesn't return anything and doesn't use callback
// make sure it is resolved if static hook doesn't use callback
_resolve();
}
});
Expand Down

0 comments on commit 87a7905

Please sign in to comment.