Aman-Mittal commented on issue #777:
URL:
https://github.com/apache/fineract-backoffice-ui/issues/777#issuecomment-6211182790
## Permission check flow (proposed)
```mermaid
sequenceDiagram
actor U as User
participant R as Route guard
participant V as WC loan view
participant F as Fineract
U->>V: Open loan (READ_WORKINGCAPITALLOAN)
V->>V: For each action, hasPermission(code for that command)
V-->>U: Show only actions the user can perform
U->>R: Click Approve
R->>R: wcCommandPermission(approve) = APPROVE_WORKINGCAPITALLOAN
alt user holds code or ALL_FUNCTIONS
R->>F: POST /working-capital-loans/{id}?command=approve
F-->>U: 200, or queued for APPROVE_WORKINGCAPITALLOAN_CHECKER
else missing code
R-->>U: /forbidden (never reaches Fineract)
end
```
## What each role should see (mockup)
```text
Loan officer (READ, CREATE/UPDATE application, REPAYMENT, CREATE charge)
┌ WC Loan #000123 · Active ────────────────────────────────────────────────┐
│ [Repayment] [+ Add charge] [⋮] ├ Attach originator │
└──────────────────────────────────────────────────────────────────────────┘
Credit approver (APPROVE, REJECT, APPROVALUNDO, DISBURSE, DISBURSALUNDO,
WAIVE charge)
┌ WC Loan #000124 · Submitted ─────────────────────────────────────────────┐
│ [Approve] [Reject] [⋮] ├ Undo approval │
└──────────────────────────────────────────────────────────────────────────┘
Auditor (ALL_FUNCTIONS_READ)
┌ WC Loan #000123 · Active ────────────────────────────────────────────────┐
│ (no action buttons; all tabs readable) │
└──────────────────────────────────────────────────────────────────────────┘
Today: all three users see the same full button set, and the action routes
accept
only UPDATE_WORKINGCAPITALLOAN.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]