URD: User Management
| Module | Version | Updated |
|---|---|---|
CORE-01 | v1.0 | 2026-07-15 |
What the User Management module does
Defines the user-facing requirements for User Management - the platform's foundation. Every other module trusts the identity and scope this module issues: how a person creates an account, authenticates, and manages a profile; how one user can belong to several organizers (Organizer) at once; and how an owner manages staff within their own organizer.
The three surfaces, Client, Sale, and Back Office, serve three very different audiences, sharing one sign-in mechanism but blocked cross-page by role tier - an internal administrative account cannot slip into the customer-facing page, and the reverse.
Five things to understand first
This is the most important part of the document. Understanding the five points below covers 80% of the module.
1. A user is an identity, separate from role and scope
A user is an authenticated identity - internal (operator) or external (owner, employee, customer). Role and scope are not baked into the user; they are assigned separately and carried in the session token on every sign-in.
The Session Token (JWT) is issued on sign-in and carries the user ID, roles, organizer (Organizer) ID, and merchant (Merchant) ID for stateless authorization - changing a user's role or scope only takes effect on their next sign-in, not immediately.
2. Three kinds of identifiers, each globally unique
An identifier (Identifier) is a login value tied to a user - username, email, or phone. Each is globally unique within its type: there are never two accounts sharing the same username, or the same verified email or phone number.
| Identifier | Required | Initial state |
|---|---|---|
| Username | Required | Automatically considered verified |
| Optional | Unverified, needs OTP | |
| Phone | Required for Owner tier and below, after onboarding | Unverified, needs an SMS OTP (VNPAY) |
Username is the primary identifier - signing up and signing in with a username always works, independent of email or phone.
3. Eight fixed roles, split into tiers that decide which page a user can enter
There are eight fixed roles (Role), pre-seeded and unable to be edited or deleted - from Guest (lowest) up to the highest internal roles. Role priority is enforced: no one can manage a role at their own level or above.
Roles split into two tiers, and the tier decides which page a user can sign into:
- Above Owner (Super Admin, Admin, Operator) - can only reach the Back Office. To act as a customer, a separate account must be created.
- Owner tier and below (Owner, Cashier, Employee, Customer) - can only reach Client or Sale, never the Back Office.
This blocking happens on the server, not just in the interface - calling the API directly is blocked too.
4. A user can belong to several organizers at once
A user is not confined to a single organizer (Organizer) - they can belong to multiple organizers at once, each holding its own role and merchant (Merchant) scope. After signing in, the user picks the organizer to work in at the launchpad, and can switch to another at any time using the switcher in the app.
A user added to another organizer this way still onboards like a normal user - phone verification still applies - and still keeps the right to create their own organizer.
5. Employees come in two kinds: with sign-in access and without
An owner creates employee accounts and assigns them to one or more merchants, but not every employee needs to sign in right away. An employee without sign-in access is still tracked in the system; granting them access later (a username plus a set-password mail) does not require recreating them from scratch.
The two kinds have different off-boarding lifecycles: an employee with sign-in access can be deactivated; an employee without sign-in access can only be removed - there is no status field to deactivate.
What the module covers
Five feature areas. Click an AREA code to jump to the Details tab and read that area's requirements.
AREA | Name | Status |
|---|---|---|
AUTH | Authentication | Partial |
USR | User Account | Partial |
MORG | Multi-organizer Membership | Partial |
EMP | Employee Management | Partial |
OPS | Operations Staff Administration (BO) | Partial |