Skip to content

Commit d115e23

Browse files
ansh-varshneyAnsh Varshney
andauthored
fix(clients-view): add permission guard to Applications menu for tresurer (#3382)
The Applications button in the client hamburger menu was visible to all users regardless of permissions when RBAC is enabled, because only the child items inside the submenu had mifosxHasPermission guards and the parent trigger button had none. Add a combined permission check so the button only renders if the user has at least one of: CREATE_LOAN, CREATE_SAVINGSACCOUNT, CREATE_SHAREACCOUNT, CREATE_RECURRINGDEPOSITACCOUNT, CREATE_FIXEDDEPOSITACCOUNT. Fixed the changes needed for the treasurer role. Closes: WEB-844 fix(env): revert productionModeEnableRBAC default to false for backward compatibility Co-authored-by: Ansh Varshney <your-email@example.com>
1 parent fdb8b8f commit d115e23

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/app/clients/clients-view/clients-view.component.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,17 @@ <h3 class="flex-95">
208208
</button>
209209

210210
@if (isActive()) {
211-
<button mat-menu-item [matMenuTriggerFor]="accountApplications">
211+
<button
212+
mat-menu-item
213+
[matMenuTriggerFor]="accountApplications"
214+
*mifosxHasPermission="[
215+
'CREATE_LOAN',
216+
'CREATE_SAVINGSACCOUNT',
217+
'CREATE_SHAREACCOUNT',
218+
'CREATE_RECURRINGDEPOSITACCOUNT',
219+
'CREATE_FIXEDDEPOSITACCOUNT'
220+
]"
221+
>
212222
<mat-icon matListIcon>
213223
<fa-icon icon="money-bill-alt" size="sm"></fa-icon>
214224
</mat-icon>

0 commit comments

Comments
 (0)