Users, roles & audit
Permissions declared at every endpoint, generated from a single matrix, and enforced on both runtimes. Roles you compose yourself, record visibility per branch or warehouse, MFA on sensitive roles, and an append-only audit log with a hash chain verified daily.
- Composable roles from one permission matrix
- Record visibility by branch or warehouse
- MFA for admin and finance roles
- Append-only, hash-chained audit log
Access is not a setting bolted on at the end. Every endpoint declares the permission it needs, those declarations are generated from one matrix, and both the Dart and the Java runtime enforce the same matrix.
What is in it
- Users, custom roles, and a permission matrix you can read
- Record visibility — narrow a role to its own branch or warehouse
- Multi-factor authentication on admin and finance roles
- A sidebar you can rename and reorder per deployment
- An append-only audit log with actor, before-state, and after-state
The audit log is a hash chain, verified daily. Tampering with a past entry breaks the chain and is detected within twenty-four hours.
How Users, roles & audit fits the rest of the system
Bounded
The module owns its tables and its service interface. Other modules reach in only through services and async events — never SQL.
Test-vector verified
Every domain rule has two implementations — Dart and Java — and a single shared test vector. CI fails on any divergence.
Audit-logged
Every command writes an entry to the append-only audit log with a chain hash. The daily verifier proves the log has not been tampered with.