fix(billing): friendly locked state for users without finance access (MAPPS-133) #101

Merged
longjacksonle merged 1 commit from fix/mapps-133-billing-locked-state into main 2026-06-10 01:23:16 +02:00

What

Replace the bare "You do not have permission to access billing pages" error string with a friendly locked state on the billing pages (invoices / payments) for users without finance access. Last open AC of MAPPS-133.

Changes

  • Rework the shared NoFinancePermission component: an information icon in a soft circle, a clear "Billing access required" heading, a sentence explaining access is limited to administrator and finance roles, and the viewer's current role for context.
  • Same gate (can_manage_billing), better UX for a genuinely unauthorized role.

Context

The core MAPPS-133 defect (billing pages 403ing because the user's role was wrongly read as technician) was fixed by PMS-158 (bunyip now emits bunyip_role; the SPA sources the role from /api/v1/auth/me). This PR finishes the remaining acceptance criterion.

Verification

cargo check --target wasm32-unknown-unknown and cargo fmt --check clean. (The one host clippy hit is clippy::manual_checked_ops on pre-existing projects.rs:685, a lint that only exists in host rust 1.95; CI runs rust 1.94 where it does not fire.)

🤖 Generated with Claude Code

## What Replace the bare "You do not have permission to access billing pages" error string with a friendly **locked state** on the billing pages (invoices / payments) for users without finance access. Last open AC of MAPPS-133. ## Changes - Rework the shared `NoFinancePermission` component: an information icon in a soft circle, a clear **"Billing access required"** heading, a sentence explaining access is limited to administrator and finance roles, and the viewer's **current role** for context. - Same gate (`can_manage_billing`), better UX for a genuinely unauthorized role. ## Context The core MAPPS-133 defect (billing pages 403ing because the user's role was wrongly read as `technician`) was fixed by PMS-158 (bunyip now emits `bunyip_role`; the SPA sources the role from `/api/v1/auth/me`). This PR finishes the remaining acceptance criterion. ## Verification `cargo check --target wasm32-unknown-unknown` and `cargo fmt --check` clean. (The one host clippy hit is `clippy::manual_checked_ops` on pre-existing `projects.rs:685`, a lint that only exists in host rust 1.95; CI runs rust 1.94 where it does not fire.) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(billing): friendly locked state for users without finance access (MAPPS-133)
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 51s
Create release / Create release from merged PR (pull_request) Has been skipped
b678a94c8b
The shared NoFinancePermission view rendered only a bare error sentence. Replace it with a proper locked state: an information icon, a clear "Billing access required" heading, a sentence on who has access (administrator and finance roles), and the viewer's current role for context. Same gate, better UX for a genuinely unauthorized role.

This is the last MAPPS-133 acceptance criterion; the core defect (billing pages 403ing for users whose role was wrongly read as technician) was resolved by PMS-158.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
longjacksonle deleted branch fix/mapps-133-billing-locked-state 2026-06-10 01:23:16 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!101
No description provided.