fix(crm): Setup card only for settings holders while setup is incomplete #22

Merged
KofTwentyTwo merged 1 commits from feature/crm-setup-admin-only into develop 2026-10-16 15:19:23 +00:00
KofTwentyTwo commented 2026-10-16 14:10:57 +00:00 (Migrated from github.com)

Summary

The CRM home's crm_setup widget is now a settings-holder, setup-incomplete-only card.

  • Requires crm.manage.hasAccess (the permission that guards the CRM Settings tables), DenyBehavior.HIDDEN, so other CRM users never get it in metadata or render.
  • New CrmSetupVisibility custom permission checker (same request-time mechanism crm_goals uses via CrmGoalsVisibility) denies the widget once no business step is missing, so a complete setup omits the card instead of showing "Nothing to do".
  • Removed the "Email delivery" row (provider configuration) from the checklist; it is business setup only (pipeline, stages, lifecycle stages, base currency). Email delivery status belongs to the Email admin app.

Rubric item moved

A1 0 -> 1 on CRM (crm) business-user view (purpose line comes with CORE-ROLE).

Audit row fixed

CRM A1: "crm_setup (2nd widget, always rendered even when complete ...) shows CRM configuration plus a provider-configuration row ... to every CRM user (A-0)".

Tests

  • CrmSetupStatusTest: non-settings CRM user: hasWidgetPermission false and enforced render denied (even with setup incomplete); settings holder: present while incomplete, absent and render denied once complete; checklist has no email row.
  • CrmHomeWidgetsTest unchanged and green. Full ./mvnw verify: 493 tests, 0 failures, checkstyle clean.

Screenshots

Widget-level before/after preview of an incomplete setup at 390, 768, 1024, 1440, 1920, 3200 (attached locally):
C:\Users\james\AppData\Local\Temp\claude\R--Git-Local-KofTwentyTwo-Praetor\83da0ae2-628c-4edb-9fd7-a93d49e86d27\scratchpad\dashboard-standard\pr-shots\qbit-crm-setup
(<width>-before.png, <width>-after.png). Full-page shots happen when kof22 pins the release.

Release

A qbit-crm RC is needed after v0.2.0-RC.5 (kof22 main pins qbit-crm.version 0.2.0-RC.5). kof22 (Website-Backend) must bump qbit-crm.version to the new RC.

🤖 Generated with Claude Code

## Summary The CRM home's `crm_setup` widget is now a settings-holder, setup-incomplete-only card. - Requires `crm.manage.hasAccess` (the permission that guards the CRM Settings tables), `DenyBehavior.HIDDEN`, so other CRM users never get it in metadata or render. - New `CrmSetupVisibility` custom permission checker (same request-time mechanism `crm_goals` uses via `CrmGoalsVisibility`) denies the widget once no business step is missing, so a complete setup omits the card instead of showing "Nothing to do". - Removed the "Email delivery" row (provider configuration) from the checklist; it is business setup only (pipeline, stages, lifecycle stages, base currency). Email delivery status belongs to the Email admin app. ## Rubric item moved A1 0 -> 1 on CRM (`crm`) business-user view (purpose line comes with CORE-ROLE). ## Audit row fixed CRM A1: "crm_setup (2nd widget, always rendered even when complete ...) shows CRM configuration plus a provider-configuration row ... to every CRM user (A-0)". ## Tests - `CrmSetupStatusTest`: non-settings CRM user: `hasWidgetPermission` false and enforced render denied (even with setup incomplete); settings holder: present while incomplete, absent and render denied once complete; checklist has no email row. - `CrmHomeWidgetsTest` unchanged and green. Full `./mvnw verify`: 493 tests, 0 failures, checkstyle clean. ## Screenshots Widget-level before/after preview of an incomplete setup at 390, 768, 1024, 1440, 1920, 3200 (attached locally): `C:\Users\james\AppData\Local\Temp\claude\R--Git-Local-KofTwentyTwo-Praetor\83da0ae2-628c-4edb-9fd7-a93d49e86d27\scratchpad\dashboard-standard\pr-shots\qbit-crm-setup` (`<width>-before.png`, `<width>-after.png`). Full-page shots happen when kof22 pins the release. ## Release A qbit-crm RC is needed after `v0.2.0-RC.5` (kof22 `main` pins `qbit-crm.version` 0.2.0-RC.5). kof22 (Website-Backend) must bump `qbit-crm.version` to the new RC. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.