Permission catalogue
The vocabulary is src/app/shared/users/user-permissions.enum.ts — 40 codes.
Mechanics (the two deny filters, the four gating mechanisms, supplier-scoped grants
and sub-permissions) are in authorisation.
|
Client-side gating is advisory. The backend enforces every protected operation. A code with no front-end enforcement listed below is still meaningful server-side. |
The two deny filters
These are restrictions, not grants — holding one removes access.
| Code | Enforced in |
|---|---|
|
Route clauses in |
|
The same route tables and sidebar clauses, plus
|
The three reusable route spreads that combine them are defined in
suppliers/suppliers-routing.routes.ts — RESTRICTED_UW_ACCESS_CONFIG,
RESTRICTED_AUDITORS_ACCESS_CONFIG,
RESTRICTED_REST_UW_ACCESS_ONLY_CONFIG. See
the route catalogue.
Login and session
| Code | Governs / enforced in |
|---|---|
|
Token issuance. No front-end check. |
|
Supplier-side login. No front-end check. |
|
Internal login. Used as a filter in
|
|
Soft-deleted account marker. No front-end check. |
Broad roles
| Code | Governs / enforced in |
|---|---|
|
Broad administrative access. No explicit front-end check — it is a backend role. |
|
Read-only access. No explicit front-end check. |
|
Allow-list on |
|
No explicit front-end check. |
|
|
|
No explicit front-end check. Note the non-uppercase enum value. |
|
No explicit front-end check. |
|
No explicit front-end check. |
|
|
|
Allow-list on |
|
|
Administration
| Code | Governs / enforced in |
|---|---|
|
General update rights. No explicit front-end check. |
|
Users and permission groups ( |
|
Global settings. Checked in
|
|
Email settings. Checked in
|
|
Event rules. No explicit front-end check
( |
|
Report administration. Checked in
|
|
The broadest imperative permission in the front end:
|
Money operations
| Code | Governs |
|---|---|
|
Marketplace payments (Add MP Payment, Add Zero MP Payment). |
|
Receivables (Add receivable). |
|
Transaction cancellation. |
|
Fee updates (Adjust Payability Fee, the fees tab). |
|
Payment administration (batches). |
|
Payment review (batch approval). |
|
Payment management. |
|
Write-offs and bad-debt recovery. |
None of these carry an explicit front-end check in the current code — they are enforced by the backend, and the corresponding UI is reached through the Actions menu. See lifecycle actions and transactions.
Supplier data
| Code | Governs |
|---|---|
|
Supplier credentials (password reset, login-as-supplier). |
|
Linking payment gateways to a marketplace record. See marketplaces. |
Sub-permissions
The only codes checked through SubPermissionsGuard and
UsersService.checkPermission:
| Code | Enforced in |
|---|---|
|
Route |
|
Route data on |
|
|
|
|
Sub-permissions are resolved via GET perms/:permCode/sub-perms, and are also what
EvaComponent forwards to EVA as EvaPermissions. Note the cache in
UsersService.getPermissionSubPerms ignores permCode — see
authorisation.
Allow-list clauses (the only two)
| Route | Clause |
|---|---|
|
|
|
|
|
An |
Permission models
| Model | Fields |
|---|---|
|
|
|
|
|
|
|
|
Checking permissions in code
| Call | Returns |
|---|---|
|
Synchronous — the object or |
|
|
|
|
|
|
|
|
All five are in live use. Match the local convention of the file you are editing.
Administering grants
| Operation | Endpoint |
|---|---|
List permissions/groups |
|
A user’s grants |
|
Sub-permissions of a permission |
|
Grant |
|
Revoke |
|
See manage.
Adding a permission
-
Add the code to
USER_PERMISSION— matching the backend’s exact string, including any non-uppercase casing. -
Gate the route (
data.permissions) and/or the template (*ngxPermissionsOnly/*ngxPermissionsExcept), and update the sidebar entry to match. -
For a sub-permission, use
data.requireOneOfSubPermissionswithSubPermissionsGuard. -
Add a row to this page and, if it changes a route, to the route catalogue.