mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
fix(#4906): 🐛 Fixed an issue with power users and permissions
This commit is contained in:
parent
0069bfdf54
commit
80884bcd72
2 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ export class RadarrSettingsState {
|
||||||
|
|
||||||
@Action(LoadSettings)
|
@Action(LoadSettings)
|
||||||
public load({ setState }: StateContext<RadarrState>): Observable<RadarrState> {
|
public load({ setState }: StateContext<RadarrState>): Observable<RadarrState> {
|
||||||
const isAdmin = this.authService.isAdmin();
|
const isAdmin = this.authService.hasRole("Admin");
|
||||||
const calls = isAdmin ? [this.settingsService.getRadarr()] : [of({})];
|
const calls = isAdmin ? [this.settingsService.getRadarr()] : [of({})];
|
||||||
|
|
||||||
return combineLatest(calls).pipe(
|
return combineLatest(calls).pipe(
|
||||||
|
|
|
@ -18,7 +18,7 @@ export class SonarrSettingsState {
|
||||||
|
|
||||||
@Action(LoadSettings)
|
@Action(LoadSettings)
|
||||||
public load({ setState }: StateContext<SonarrState>): Observable<SonarrState> {
|
public load({ setState }: StateContext<SonarrState>): Observable<SonarrState> {
|
||||||
const isAdmin = this.authService.isAdmin();
|
const isAdmin = this.authService.hasRole("Admin");
|
||||||
const calls = isAdmin ? [this.sonarrService.getVersion(), this.settingsService.getSonarr()] : [of(""), of({})];
|
const calls = isAdmin ? [this.sonarrService.getVersion(), this.settingsService.getSonarr()] : [of(""), of({})];
|
||||||
|
|
||||||
return combineLatest(calls).pipe(
|
return combineLatest(calls).pipe(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue