Skip to content

Commit

Permalink
fix: fix that fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KernelDeimos committed Jun 18, 2024
1 parent e63ab3a commit b126b67
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/backend/src/services/auth/PermissionService.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ class PermissionImplicator {
* @param {string} permission
* @returns
*/
async check (actor, permission) {
return await this.checker(actor, permission);
async check ({ actor, permission, recurse }) {
return await this.checker({ actor, permission, recurse });
}
}

Expand Down Expand Up @@ -263,7 +263,11 @@ class PermissionService extends BaseService {

for ( const implicator of this._permission_implicators ) {
if ( ! implicator.matches(permission) ) continue;
const implied = await implicator.check(actor, permission);
const implied = await implicator.check({
actor,
permission,
recurse: this.check.bind(this),
});
if ( implied ) return implied;
}

Expand Down

0 comments on commit b126b67

Please sign in to comment.