Skip to content

decision(policy): cashier print permission default, zero-admin recovery boundary, and setup telemetry consent #1237

Closed

Description

@khaira777

Summary & Intent

This issue consolidates the remaining unstarted product, UX, account-recovery, and privacy-consent decisions identified across prior FloCafe engineering sessions so @itsbkm has a single canonical decision & handoff checklist with verified origin/main (186bfe84) file and line citations.


Open Decisions & Verified origin/main Citations

1. Cashier Default Permission to Print Bills (shared/permissions.ts:170-176)

  • Current Behavior on main:
    • In shared/permissions.ts:170-176, bills.print has defaultRoles: OWNER_MANAGER (excluding cashier by default), whereas bills.read and bills.take_payment include cashier.
    • Unless an owner manually grants bills.print to a cashier, a default cashier role can settle a bill but receives 403 when attempting to print the customer receipt.
  • Decision for @itsbkm:
    • Option A: Add 'cashier' to bills.print default roles in shared/permissions.ts:170-176 (and migrate uncustomized cashier role defaults).
    • Option B: Keep bills.print restricted to OWNER_MANAGER by default.

2. Master-PIN Recovery When Zero Active Users Can Reach Administration (main/routes/auth.ts:576-645)

  • Current Behavior on main:
    • POST /api/auth/recover-password (main/routes/auth.ts:576-645) allows resetting an owner's password or promoting a non-owner account only if !hasActiveAdministrator() (zero active owner/admin accounts exist).
    • If all active accounts are locked out or if zero active accounts exist in users, recovery returns 404 No active account found.
  • Decision for @itsbkm:
    • Option A: Keep the current strict boundary (!hasActiveAdministrator() with at least one active user row required).
    • Option B: When a valid recovery Master PIN / recovery code is verified and zero active administrators exist, allow unlocking/reactivating the primary owner account even if it was marked inactive or locked.

3. Diagnostics Telemetry Default Opt-In vs /setup Consent (main/db.ts:7281-7313)

  • Current Behavior on main:
    • Migration 110_enable_safe_diagnostics_transmission_once (main/db.ts:7281-7313) sets diagnostics_transmission_enabled = 'true' automatically during database initialization before /setup completes.
    • Meanwhile, the initial /setup onboarding flow (PR #1204) presents a telemetry consent toggle to the operator.
  • Decision for @itsbkm:
    • Option A: Defer enabling outbound diagnostics transmission until /setup is completed (or default diagnostics_transmission_enabled to 'false' until /setup saves the operator's choice).
    • Option B: Keep migration 110's default 'true' with the /setup checkbox pre-checked as an opt-out toggle.

4. Cross-References to Open UX Issues (#630, #643, #644)

The following UX decisions have also been updated with exact origin/main citations on their respective issues and assigned to @itsbkm:

  • Issue #630 ([UX] POS View):
    1. frontend/src/components/pos/CartPanel.tsx:98-103 & frontend/src/store/cart.ts:161-165: Whether clicking - at quantity 1 should remain instant item deletion or be disabled (disabled={item.quantity <= 1}) in favor of the adjacent trash icon.
    2. frontend/src/hooks/usePosKeyboardShortcuts.ts:116-187: Phase 2 POS keyboard shortcuts (Space instant tender vs payment modal confirmation, macOS function-key chords, and confirmation modal on Alt+Backspace cart clear).
  • Issues #643 & #644 ([UX] Active Orders & [UX] Order History):
    • frontend/src/app/(dashboard)/orders/page.tsx:67, 170, 1535-1603: Whether the unified /orders screen should keep its 4 top-level tabs (all, active, unpaid, held) with cancelled in the status dropdown, or add a dedicated top-level cancelled / completed tab.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions