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 88f1d55
Browse filesBrowse the repository at this point in the historyBrowse files
fix(ui): read the Export verdict through isObjectExportOffered in @object-ui/core
The three Export entries (ObjectGrid, ListView, the dataset report's
ReportExportControl) called resolveEffectiveCrudAffordances themselves, which
the affordance-to-grant census refuses outside its home modules. The verdict
now lives in managedBy.ts as isObjectExportOffered, beside
isObjectInlineEditable, and each entry reads it. Behaviour is unchanged: the
resolved exportCsv bit, ANDed with the effective `export` operation.
Export is a read, so it gets no AFFORDANCE_GRANTS row: can(object, 'export')
answers allowRead in MePermissionsProvider, and the caller's allowExport
already reaches the client through the effective `export` operation, which
the server derives from list and allowExport.
The helper is a new name on @object-ui/core's published entry, so the
changeset grades core minor and declares Clause-② yes. Docs, READMEs and the
liveness evidence name the helper.
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibxUmEWpcN3eh4vH1WY
Copy file name to clipboardExpand all lines: .changeset/35619-user-actions-export-csv-enforced.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
---
2
2
'@objectstack/spec': minor
3
+
'@object-ui/core': minor
3
4
'@object-ui/plugin-grid': minor
4
5
'@object-ui/plugin-list': minor
5
6
'@object-ui/plugin-report': minor
@@ -8,7 +9,7 @@
8
9
9
10
feat: an object's `userActions.exportCsv: false` hides the console's Export entry
10
11
11
-
Clause-②: no
12
+
Clause-②: yes
12
13
Metadata-protocol: semantic
13
14
14
15
`userActions.exportCsv` on an object now does what the Studio object form says it does. Set to `false`, the console offers no Export entry for that object's records, in any format:
@@ -17,7 +18,7 @@ Metadata-protocol: semantic
17
18
- the list view hides Export in both toolbar forms, the wide toolbar's button and the Display panel's export footer;
18
19
- a dataset report hides its Export control when the dataset's base object sets it.
19
20
20
-
Every surface reads one verdict, `resolveEffectiveCrudAffordances(objectSchema, effectiveApiOperations).exportCsv` from `@object-ui/core`: the authored `exportCsv` over the object's `managedBy` default, ANDed with the caller's effective `export` API operation. Before this change the surfaces read only the effective operation, so `exportCsv: false` changed nothing.
21
+
Every surface reads one verdict, the new `isObjectExportOffered(objectSchema, effectiveApiOperations)` from `@object-ui/core`: the authored `exportCsv` over the object's `managedBy` default, ANDed with the caller's effective `export` API operation. Before this change the surfaces read only the effective operation, so `exportCsv: false` changed nothing. Export is a read, so the verdict is not a row of `AFFORDANCE_GRANTS` and asks no `can(object, verb)`: the caller's export grant reaches the console through the effective `export` operation, which the server derives from `list` and `allowExport`.
21
22
22
23
Nothing changes for an object that does not author the key: every `managedBy` bucket still defaults `exportCsv` to `true` (ADR-0103), so its Export entry stays. The setting hides the entry and is not a permission: no export request is refused because of it, and who may export is still the permission set's `allowExport`. The report reads the base object's definition through the report's data source, and a report whose source cannot serve one keeps its Export control.
Copy file name to clipboardExpand all lines: packages/spec/liveness/object.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -245,7 +245,7 @@
245
245
"status": "live",
246
246
"verifiedAt": "2026-11-19",
247
247
"evidence": "packages/spec/src/data/object.zod.ts#resolveCrudAffordances (collapses `obj.userActions` onto the managedBy bucket's default row, the one resolution of the five CRUD entries); ui/packages/core/src/utils/managedBy.ts#resolveEffectiveCrudAffordances (hands the object's `userActions` to it and intersects the answer with the server's effective API operations)",
248
-
"note": "Drilled 2026-11-19 when `transfer` (the Change Owner switch, ruling 7000907189 point 1, card #35401) landed beside the five CRUD entries with a different verdict: the container used to carry one blanket `live` (\"objectui ObjectGrid per-object CRUD.\") and was recorded in undrilled-containers.baseline.json, so its children had no verdict of their own. Each child below is graded by its own reader, measured at this tree: create/import/edit/delete read through resolveCrudAffordances by the server write guard, the apiMethods reconciliation, the /me/permissions clamp and the console's affordance rows; exportCsv by the console's export entries through resolveEffectiveCrudAffordances (see its row; it was graded dead on 2026-11-19 and flipped live on 2026-11-21 when those entries were wired, #35619); transfer by nothing yet (planned).",
248
+
"note": "Drilled 2026-11-19 when `transfer` (the Change Owner switch, ruling 7000907189 point 1, card #35401) landed beside the five CRUD entries with a different verdict: the container used to carry one blanket `live` (\"objectui ObjectGrid per-object CRUD.\") and was recorded in undrilled-containers.baseline.json, so its children had no verdict of their own. Each child below is graded by its own reader, measured at this tree: create/import/edit/delete read through resolveCrudAffordances by the server write guard, the apiMethods reconciliation, the /me/permissions clamp and the console's affordance rows; exportCsv by the console's export entries through isObjectExportOffered (see its row; it was graded dead on 2026-11-19 and flipped live on 2026-11-21 when those entries were wired, #35619); transfer by nothing yet (planned).",
249
249
"children": {
250
250
"create": {
251
251
"status": "live",
@@ -271,7 +271,7 @@
271
271
"status": "live",
272
272
"verifiedAt": "2026-11-21",
273
273
"evidenceScope": "in-repo",
274
-
"evidence": "ui/packages/core/src/utils/managedBy.ts#resolveEffectiveCrudAffordances (hands the object's `userActions` to resolveCrudAffordances and ANDs the resolved `exportCsv` with the effective `export` API operation: the one export verdict every entry below reads); ui/packages/plugin-grid/src/ObjectGrid.tsx#ObjectGrid (`objectExportOffered`: the toolbar Export menu, its handler and the table's own CSV button); ui/packages/plugin-list/src/ListView.tsx#ListView (`exportPermitted`: the wide toolbar's Export, the Display panel's export footer and the export handler); ui/packages/plugin-report/src/ReportExport.tsx#ReportExportControl (the dataset report's Export, on the query answer's base object, whose definition it reads through the report's data source)",
274
+
"evidence": "ui/packages/core/src/utils/managedBy.ts#isObjectExportOffered (the resolved `exportCsv` bit, through resolveEffectiveCrudAffordances, which hands the object's `userActions` to resolveCrudAffordances and ANDs the bit with the effective `export` API operation: the one export verdict every entry below reads); ui/packages/plugin-grid/src/ObjectGrid.tsx#ObjectGrid (`objectExportOffered`: the toolbar Export menu, its handler and the table's own CSV button); ui/packages/plugin-list/src/ListView.tsx#ListView (`exportPermitted`: the wide toolbar's Export, the Display panel's export footer and the export handler); ui/packages/plugin-report/src/ReportExport.tsx#ReportExportControl (the dataset report's Export, on the query answer's base object, whose definition it reads through the report's data source)",
275
275
"note": "Flipped dead → live 2026-11-21 (#35619, ruling 7035537883: enforce). `exportCsv: false` hides the whole export entry, every format, matching the `exportCsv → export` operation mapping in resolveEffectiveCrudAffordances; the bucket defaults (ADR-0103, `exportCsv: true` in every bucket) are unchanged, so an object that does not author the key keeps its entry. It is a console affordance, not a permission: no server door reads it (plugin-security's WRITE_OP_AFFORDANCE, the spec's MANAGED_WRITE_VERB_AFFORDANCE and core's clampManagedObjectWrites map only create/edit/delete), and who may export stays the permission set's allowExport through the effective `export` operation. RelatedList (ui/packages/plugin-detail/src/RelatedList.tsx) offers no export entry at this tree: its table is drawn with `exportable: false`, its enlarged grid carries no `exportOptions`, and its toolbar has no export control, so there is nothing there to gate. Pinned per surface by the `*-35619` render tests beside each reader, each with a CONTROL that the default still shows the entry."
0 commit comments