mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 04:49:33 -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 {
|
public hasRole(role: string): boolean {
|
||||||
if (this.claims().roles) {
|
const claims = this.claims();
|
||||||
return this.claims().roles.some(r => r.toUpperCase() === role.toUpperCase());
|
|
||||||
|
if (claims && claims.roles && role) {
|
||||||
|
return claims.roles.some(r => r.toUpperCase() === role.toUpperCase());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue