← All tests

R1.3.1 — Cashier picker + manager POS PIN + anti-escalation password LOCAL

2026-04-22. Four QA gaps in R1.3 closed in one cycle:
(1) PIN-collision: two cashiers sharing a random 4-digit PIN. Fix — two-step Lock screen (cashier tile picker → PIN keypad), verify PIN against the explicitly chosen identity only.
(2) Manager/Owner couldn't unlock: only PIN identities could open a register. Fix — "Unlock as {web-user}" button visible to users with nix_cafe.pos.session_open.
(3) Unattended-terminal risk on manager override: first pass required no second factor. Fix — new tenant_users.pos_pin_hash, inline "Set your POS PIN" dialog, and mandatory keypad entry on the manager unlock path.
(4) Cashier-escalation via Set-PIN on unattended manager session: a cashier who finds an open manager session could previously set a PIN of their choice and escalate. Fix — setOwnPosPinAction now requires the caller's Commerce password (bcrypt-verified against password_hash) before the PIN is written. Possession of the session cookie alone is no longer enough.

5/5 local Gate 1 checks passed. (1) Schema: tenant_users.pos_pin_hash column lands. (2) Manager POS PIN DAO round-trip — two owners with the same PIN "1357" each verify only under their own user id; rotation invalidates the old PIN; deactivated users fail verify even with correct PIN. (3) Cashier-side collision test unchanged (11 assertions). (4) HTTP smoke on the fullscreen route still 307.
Gate 2 (prod) will capture the full flow. Screenshots planned: (a) Lock screen with "Set your POS PIN" CTA (owner without a PIN set); (b) SetPosPinDialog with two PIN inputs; (c) after save, Lock screen shows "Unlock as {name}" Manager override button; (d) click → keypad with ShieldCheck + "Manager" label + "Enter your POS PIN" prompt; (e) correct PIN → PreShift. Plus DB assertion that cafe.sessions records opened_by_user_id when manager path is used.

00What's new in the codebase

01Cashier DAO — picker list + collision-safe verify✓ 11 assertions

Loading…

02Manager POS PIN DAO — set, verify, rotate, collision-safe✓ 8 assertions

Loading…

03Anti-escalation — password gate on setOwnPosPinAction✓ bcrypt path proven

Loading…