You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(example-crm): grant crm_opportunity_line_item in crm_sales_user, matching its master crm_opportunity (#8164) (#8228)
* fix(example-crm): grant crm_opportunity_line_item in crm_sales_user, matching its master crm_opportunity (#8164)
crm_opportunity_line_item is a master-detail CHILD of crm_opportunity
(sharingModel: 'controlled_by_parent', inlineEdit: 'grid' on the
Opportunity form), but crm_sales_user granted object-level CRUD on 5
CRM objects and never the line item. Record-level access always
follows the master (ADR-0055), but object-level CRUD is a SEPARATE
gate the platform never derives -- every role-bound (non-admin) user
got a silent 403 the moment they tried to add/edit a product line on
an Opportunity they otherwise fully own. The platform's own
build-time lint (security-master-detail-ungranted) already flagged
this independently.
Grant shape matches the master exactly:
{ allowRead: true, allowCreate: true, allowEdit: true, allowDelete: false }.
Adds one purely-additive test asserting the grant exists and equals
the master's -- there was zero prior coverage of crm_sales_user's
grant contents.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PEVB6w7D7uCszR9Mw1BL73
* fix(example-crm): refresh access-matrix.json for the new line-item grant (ADR-0090 D6)
Companion to the sales-positions.ts fix (#8164): the ADR-0090 D6
access-matrix snapshot gate fails the build on any undocumented
capability drift, and granting crm_opportunity_line_item is exactly
such a drift. Regenerated with `objectstack build --update-access-matrix`
per the gate's own instructions -- the diff is the review artifact:
crm_sales_user gains create/read/edit on crm_opportunity_line_item,
recorded with the object's OWN sharingModel (controlled_by_parent),
not the master's.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PEVB6w7D7uCszR9Mw1BL73
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments