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
{{ message }}
Repository navigation
Commit 3e270d4
Browse filesBrowse the repository at this point in the historyBrowse files
fix(showcase): grant the seven navigable objects and the three master-detail children (#16069)
* fix(showcase): grant the seven navigable objects and the three master-detail children
The showcase shipped seven `type: 'object'` navigation entries whose targets no
permission set granted read on, and three master-detail children with no
object-level CRUD grant anywhere. Both rules are advisory, so `objectstack build`
stayed green and warned on every run — 33 author-time warnings, 10 of them these.
Measured on origin/main (53cbad9): `nav-object-ungranted` x7
(showcase_preference, showcase_expense_report, showcase_team, showcase_category,
showcase_business_unit, showcase_field_zoo, showcase_cascade) and
`security-master-detail-ungranted` x3 (showcase_expense_line,
showcase_field_zoo, showcase_project_membership). After: both at 0, total 33 -> 23,
no new warning class.
The grants are distributed by persona rather than pooled: read on the `everyone`
baseline for every object the shared navigation exposes (navigation is an access
claim), reference-data curation on showcase_ops, expense filing and the
project-detail children on showcase_contributor. access-matrix.json gains 14 rows
and loses none.
Two object doc comments claimed a wide `sharingModel` let any seeded persona use
the object "without a bespoke permission set". That is the misconception the rule
exists to catch — what actually carried the seeded admin was the platform's
wildcard set — so both are rewritten to separate gate (1) object CRUD from
gate (2) the OWD.
Pin: examples/app-showcase/test/nav-and-detail-grants.test.ts runs the shipped
rules against the real stack, with two controls that drop a real grant and demand
the rules name that object back.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XpTx2tbq3pZRYAdoGt6E6Y
* fix(showcase): resolve @objectstack/lint types from source, harden the pin controls
`pnpm check:type-source-resolution` went RED on the previous commit: the new
`@objectstack/lint` import in the showcase resolved its TYPES through the
workspace link to `packages/lint/dist/*.d.ts`. The gate names the remedy and
refuses the alternative -- "Add the `paths` rules to the package's tsconfig.json
-- widening the registry entry is not the fix" -- so this adds the third `paths`
entry beside the two already there, bare-keyed for exact match. It is the type
half of the vitest alias in the same PR; the runtime half was already there.
The reason bites harder for these two rules than for the existing two entries:
both are advisory and return findings rather than throwing, so a `dist` merely
behind the checkout raises nothing -- it answers with the OLD rule and the pin
passes.
Pin controls now match by CONTENT rather than by array position, so each stays a
statement about the object it names even on a tree where several grants are
missing at once.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XpTx2tbq3pZRYAdoGt6E6Y
* docs(showcase): drop two unverified runtime claims from the rewritten object comments
Self-review catch on this PR's own prose, not on the code. The rewritten comments
asserted two things this change never measured: that the objectui live e2e "no
longer depends on being admin" (that suite was not run here), and that "every
non-admin who clicked the entry got a 403" (no app was booted; the 403 is what
`nav-object-ungranted` REPORTS, not something observed).
Both are restated as what they are -- the lint rule's finding -- so the comments
claim exactly the evidence this PR carries and no more. A showcase comment is
read as documentation, so an overclaim there costs the same as an overclaim in
the docs.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XpTx2tbq3pZRYAdoGt6E6Y
* test(dogfood): grow the persona × CRUD matrix fixtures to the nine newly granted objects
The persona × CRUD-cell sweep is DERIVED from the showcase's access-matrix
snapshot, so granting the nine navigable objects pulled them into the sweep and
the fixture maps had to grow with it — `PAYLOAD[object] is not a function` was
the admin control reaching an object with no create-payload builder.
Adds a minimal valid payload and marker for all nine, seeds the two new lookup
parents (`showcase_expense_report`, `showcase_team`), generalises the EDIT probe
so the pure junction object can name its own field/value pair, and re-states the
verdict census arithmetic (54/54 → 87/77) row by row.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XpTx2tbq3pZRYAdoGt6E6Y
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments