Skip to content

ObjectDataPage ("/data" surface) gates "New" on the permission alone — the whole CRUD affordance matrix is unread there #5164

Description

@yinlianghui

Summary

Found while implementing #5153 (the object-list page's "New" / mobile FAB consuming createPredicates), during the entry-point census for the create affordance.

ObjectDataPage — the parameterized bare data surface (ADR-0055, #2251), route /apps/:appName/:objectName/data — renders its own "New" button gated on nothing but the principal's grant:

packages/app-shell/src/views/ObjectDataPage.tsx:447   {can(objectDef.name, 'create') && (
packages/app-shell/src/views/ObjectDataPage.tsx:455     data-testid="object-data-new-button"

Unlike its sibling ObjectView, this file never calls resolveEffectiveCrudAffordances at all — the string does not appear in it. So on this surface:

Note the userActions block that does appear in this file (:342) is the view's toolbar vocabulary (search / sort / filter / rowHeight / group / hideFields, per #2890) — a different key space from the object's CRUD userActions. The object-level one is genuinely absent, not spelled differently.

Why this is not a duplicate of #5153

#5153 is scoped to ObjectView.tsx, a surface that already honoured the bucket and the permission and was missing only the predicate layer on top. This is the layer below that: a surface that honours neither the bucket nor the object-level opt-out. Fixing #5153 does not touch this file, and its PR deliberately does not (radius held to ObjectView.tsx). Searched open issues for this file and for the data-surface create gate before filing; only #5153 came back.

Impact

A user reaching /apps/:app/:object/data for an object whose lifecycle bucket forbids creation is offered a "New" button that navigates to ../new. The server is the enforcement point, so this is a UI-truthfulness defect rather than a privilege escalation — but it is user-reachable today, not dormant, and it contradicts the affordance matrix the rest of the console renders from.

Severity judged at filing time is unreliable in both directions, so this is filed plainly for triage rather than graded here.

Related

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpm:queue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions