mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Fix for #2934
This commit is contained in:
parent
b4bf86f03e
commit
3a0040031c
1 changed files with 4 additions and 2 deletions
|
@ -59,8 +59,10 @@ export class AuthService extends ServiceHelpers {
|
|||
}
|
||||
|
||||
public hasRole(role: string): boolean {
|
||||
if (this.claims().roles) {
|
||||
return this.claims().roles.some(r => r.toUpperCase() === role.toUpperCase());
|
||||
const claims = this.claims();
|
||||
|
||||
if (claims && claims.roles && role) {
|
||||
return claims.roles.some(r => r.toUpperCase() === role.toUpperCase());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue