Added "noaccess" handler
This commit is contained in:
@@ -54,6 +54,12 @@ export class PermQuery extends Query {
|
|||||||
const userInfo = await this.resolveRequest.getUserInfo();
|
const userInfo = await this.resolveRequest.getUserInfo();
|
||||||
this.role(userInfo?.groups ?? []);
|
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);
|
return super.on(resource, skipConditions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user