Skip to content

CAP-CRM-REG-013Restrict regional work to authorised users

Markdown

CAP-CRM-REG-013

Restrict regional work to authorised users

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationInconsistent

KindCapabilityProduct areaCRMModuleRegionsRevision2

Read atservices-crm a8d1364freact-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Readers can inspect regional configuration without usable edit controls.Published permission tiers distinguish ordinary edits from destructive or bulk work.The product should align console gates with the service authority they represent.
Surfaces
consoleapi

Controls

14 controls apply, from the corpus control catalogue.

TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-005 TC-AZ-006 TC-DAT-001 TC-DAT-003 TC-LOG-004 TC-LOG-005 TC-PI-001 TC-TEN-001 TC-TEN-002 TC-TEN-003

Permissions

KeyChecked atScope
crm.regions.readapitenant
crm.regions.createapitenant
crm.regions.updateapitenant
crm.regions.deleteapitenant
crm.regions.bulkapitenant
crm.regions.recalculateapitenant
crm.regions.readconsoletenant
crm.regions.updateconsoletenant
crm.regions.deleteconsoletenant
crm.regions.recalculateconsoletenant

Business Rules

8 rules, 7 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
Region reads, settings, rules, previews and run reads require read authority; region creation requires create, region and policy changes require update, deletion requires delete and recalculation requires recalculate.
no proof recorded yet
permissionapitest
services-crm:tests/unit/regions-authorization.spec.ts#requires crm.regions.update to save the assignment settings
02must prove
Proposed
Regional read is read-tier authority, creation and update are user-tier authority, and deletion, bulk work and recalculation are admin-tier authority.
no proof recorded yet
permissionapiobserved
03must prove
Proposed
Regional routes grant console access only.
no proof recorded yet
permissionapitest
services-crm:tests/unit/regions-authorization.spec.ts#serves every regions route to console users only
04must prove
Proposed
Anonymous requests and signed requests outside the caller’s workspace access are rejected.
no proof recorded yet
permissionapitest
05must prove
Proposed
A read-only console user can inspect regions and policy, receives a read-only explanation and has no usable regional edit actions.
no proof recorded yet
permissionconsoletest
react-console:e2e/dev/regions.dev.spec.ts#shows a read-only user the regions, and offers them nothing that changes one
06
Proposed
The console protects direct access to the policy editor with its settings-management gate.
permissionconsoletest
react-console:components/regions/__tests__/assignment-rules-editor.test.tsx#who may open the editor › is not somebody who may only look, whatever the URL
07must prove
Proposed
The console’s view and management aliases accept alternative keys that can expose regional controls whose API requests are refused; the recalculation alias maps directly to the recalculation key.
no proof recorded yet
permissionconsoleobserved
react-console:lib/authz/backend-aliases.ts:crm.settings.view, crm.settings.manage, maintenance.operations.run
08must prove
Proposed
Read-only API authority permits listing rules but does not permit creating them.
no proof recorded yet
permissionapitest
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#the rules, one at a time › answers 403 to a create for that same read-only context

Scenarios

IdGivenWhenThenProvenance
01A reader visits regional configuration.They inspect both tabs.They can read the information and see the read-only explanation without usable edit actions.test
react-console:e2e/dev/regions.dev.spec.ts#shows a read-only user the regions, and offers them nothing that changes one

Edge Cases

IdGivenWhenThenProvenance
02A user holds contact-role read authority but lacks regional read authority.They enter the Regions page.The console gate permits entry but regional requests are refused.inferred

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.