From 80884bcd725c329867c278ad235cd4096cd4fe7a Mon Sep 17 00:00:00 2001 From: tidusjar Date: Sat, 15 Apr 2023 21:04:32 +0100 Subject: [PATCH] fix(#4906): :bug: Fixed an issue with power users and permissions --- src/Ombi/ClientApp/src/app/state/radarr/radarr.state.ts | 2 +- src/Ombi/ClientApp/src/app/state/sonarr/sonarr.state.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/state/radarr/radarr.state.ts b/src/Ombi/ClientApp/src/app/state/radarr/radarr.state.ts index b59faa624..20bf3fe9c 100644 --- a/src/Ombi/ClientApp/src/app/state/radarr/radarr.state.ts +++ b/src/Ombi/ClientApp/src/app/state/radarr/radarr.state.ts @@ -18,7 +18,7 @@ export class RadarrSettingsState { @Action(LoadSettings) public load({ setState }: StateContext): Observable { - const isAdmin = this.authService.isAdmin(); + const isAdmin = this.authService.hasRole("Admin"); const calls = isAdmin ? [this.settingsService.getRadarr()] : [of({})]; return combineLatest(calls).pipe( diff --git a/src/Ombi/ClientApp/src/app/state/sonarr/sonarr.state.ts b/src/Ombi/ClientApp/src/app/state/sonarr/sonarr.state.ts index 38d2c35e9..218dd912c 100644 --- a/src/Ombi/ClientApp/src/app/state/sonarr/sonarr.state.ts +++ b/src/Ombi/ClientApp/src/app/state/sonarr/sonarr.state.ts @@ -18,7 +18,7 @@ export class SonarrSettingsState { @Action(LoadSettings) public load({ setState }: StateContext): Observable { - const isAdmin = this.authService.isAdmin(); + const isAdmin = this.authService.hasRole("Admin"); const calls = isAdmin ? [this.sonarrService.getVersion(), this.settingsService.getSonarr()] : [of(""), of({})]; return combineLatest(calls).pipe(