Skip to content

Commit

Permalink
fix: show settings button for users w/o iam perms (#7848)
Browse files Browse the repository at this point in the history
Co-authored-by: Max Peintner <max@caos.ch>
  • Loading branch information
doncicuto and peintnermax committed Apr 29, 2024
1 parent 82e38e3 commit f5b3d97
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion console/src/app/modules/nav/nav.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@
[routerLinkActive]="['active']"
[routerLinkActiveOptions]="{ exact: false }"
[routerLink]="['/org-settings']"
*ngIf="(['policy.read'] | hasRole | async) && ((authService.cachedOrgs | async)?.length ?? 1) > 1"
*ngIf="
(['policy.read'] | hasRole | async) &&
((['iam.read$', 'iam.write$'] | hasRole | async) === false ||
(((authService.cachedOrgs | async)?.length ?? 1) > 1 &&
(['iam.read$', 'iam.write$'] | hasRole | async)))
"
>
<span class="label">{{ 'MENU.SETTINGS' | translate }}</span>
</a>
Expand Down

0 comments on commit f5b3d97

Please sign in to comment.