diff --git a/src/utils/permissions.ts b/src/utils/permissions.ts index ee02af4..93f8833 100644 --- a/src/utils/permissions.ts +++ b/src/utils/permissions.ts @@ -54,6 +54,12 @@ export class PermQuery extends Query { const userInfo = await this.resolveRequest.getUserInfo(); this.role(userInfo?.groups ?? []); } + if ( + typeof this._.role === 'object' && this._.role.includes('noaccess') || + typeof this._.role === 'string' && this._.role === 'noaccess' + ) { + this.role([]); + } return super.on(resource, skipConditions); }