fix(ApiCallService): logical OR
This commit is contained in:
parent
a8d51ffe4c
commit
ab68d1f75e
@ -310,7 +310,7 @@ export class ApiCallService implements OnApplicationShutdown {
|
||||
}
|
||||
}
|
||||
|
||||
if ((ep.meta.requireModerator ?? ep.meta.requireAdmin)) {
|
||||
if (ep.meta.requireModerator || ep.meta.requireAdmin) {
|
||||
const myRoles = await this.roleService.getUserRoles(user!.id);
|
||||
const isModerator = myRoles.some(r => r.isModerator || r.isAdministrator);
|
||||
const isAdmin = myRoles.some(r => r.isAdministrator);
|
||||
|
Loading…
Reference in New Issue
Block a user