2.0 KiB
2.0 KiB
F-187 — Admin can deactivate and delete POS cashiers
Allow administrators to safely remove cashier access without breaking historical POS attribution.
Scope
- Add an explicit active/deactivated/deleted lifecycle for backoffice POS cashier accounts.
- Show POS cashiers and their status in the TPV administration page.
- Let admins create cashiers, deactivate/reactivate them, and delete them with explicit confirmation.
- Treat delete as an irreversible soft deletion: preserve the backoffice user row and its ID so sessions, sales, receipts, reporting and audit history keep their cashier attribution.
- Revoke every live backoffice session when a cashier is deactivated or deleted.
- Reject login and existing-session authentication for inactive or deleted accounts.
- Reject deactivation/deletion while the cashier owns an open cash session; require the cash session to be closed first.
- Keep all lifecycle mutations admin-only and cashier-role-only.
Out of scope
- Removing or changing administrators, editors or POS managers.
- Reassigning historical sales or cash sessions to another cashier.
- Forcing or automating cash-session closure.
- Bulk cashier operations.
Acceptance
- Admin TPV lists POS cashiers with active, inactive or deleted status.
- Admin can create a cashier and the account is active by default.
- Admin can deactivate an active cashier and reactivate an inactive non-deleted cashier.
- Deactivation immediately revokes existing sessions and blocks future login/authentication.
- Admin can delete a cashier only after explicit confirmation; deleted cashiers cannot be reactivated or authenticate.
- Deactivation or deletion is rejected while the cashier has an open cash session.
- Deletion preserves the cashier row/ID and all historical session, sale, receipt and reporting attribution.
- Non-admin users cannot list or mutate cashier lifecycle, and non-cashier roles cannot be targeted.
- Migration is reversible and existing backoffice accounts remain active.
- Tests, typecheck, affected builds and
verify.share green.