← All tests

POS User role STAGING

Narong (board item n1, Next-Phase POS) — a limited POS User role: just enough rights to run and lock/unlock the register, and cannot see other cashiers' PINs. Gate-2 5/5 on lumiere.staging (Starter) + staging smoke 5/5.

A new pos_user system role with the same POS-operator rights as Cashier (view POS, open/close sessions, ring orders, take payments, select customers, view products) — but explicitly no nix_cafe.team.view_pin and no team.view, so a POS User can't open the Team page at all, let alone reveal a PIN. Data-only nix-db migration (no schema change); the role auto-appears in the existing Team › Invite dropdown.

Role & permissions — exactly the POS-operator set, no PIN access

The migration seeds one pos_user role per tenant with 8 permissions and grants it no PIN-view right. Verified on the staging nix_db across all 3 tenants.

staging nix_db · nix_roles code=pos_user:
demo / get-coffee / lumiere-coffee → 8 perms each · has_view_pin = false
perms: pos.view · pos.session_open · pos.session_close · orders.view · orders.create · customers.view · customers.create · products.view

Confined to POS — a POS User can operate the register…

Logged in as posuser@lumiere-coffee.com (assigned the POS User role): the POS opens normally (has pos.view).

POS User on the POS landing
POS User lands on /cafe/pos — can run the register.

…but blocked from PINs & back-office

The same login is redirected away from every admin surface — Team (where PINs live), Settings, and Dashboard — because the role lacks those permissions. "Cannot see other cashiers' PINs" is enforced twice over: no team.view (can't even open Team) and no team.view_pin.

as pos_user →
navigate toresult
/cafe/teamredirected away → /cafe/pos
/cafe/settingsredirected away
/cafe/dashboardredirected away
/cafe/posallowed
POS User redirected from Team
Hitting /cafe/team as a POS User bounces back to the POS — no access to the PIN admin.

Assignable — "POS User" in the Invite dropdown

No role-editor UI was needed: the role is loaded by the existing Team page, so an owner can assign it straight from Team › Invite.

invite role dropdown options: Owner · Manager · Cashier · POS User
Invite dropdown with POS User
Owner › Team › Invite member — "POS User" is now a selectable role.

nix-cafe d7ecc27 + nix-OS-backend c0d75c6 (staging: nix-cafe e188327 / backend e88e708, Worker 6d8c886c). nix-db data migration 20260714120000_nix_cafe_pos_user_role applied to staging. Parked on staging for the scheduled prod promote.