Stop using writability, sharing reach and non-private readability in favor of disabled object permission actions
Merged
CH
1mo ago+1019+1019+0123456789012345678901234567890123456789-6014-6014-0123456789012345678901234567890123456789
Follow-up to #29011. Object permissions are now driven by roles plus objectMetadata.disabledObjectPermissionActions. The runtime stops reading object writability, field writability, sharingReach, and every object readability except PRIVATE, which stays until the record permissions rewrite.
Nothing is removed from the data model: the columns, enums, GraphQL fields, manifest types and standard definitions all stay, so the API and published app manifests keep working.
Choices
| Concept | Choice | Now expressed as |
|---|---|---|
writability: APPLICATION (object) | migrated | update, soft delete and destroy disabled; the owning app keeps them |
readability: APPLICATION (object) | migrated | read disabled; the owning app keeps it |
writability: SYSTEM (object) | migrated in the standard app | update, soft delete and destroy disabled |
readability: SYSTEM (object) | migrated in the standard app | every action disabled |
readability: PRIVATE | kept as on main | readable only through share rows; OWNER share on create; shareWith required from callers that are not members |
readability: INHERITED | dropped | plain role access |
field writability (APPLICATION, SYSTEM) | dropped | no field-level equivalent yet |
sharingReach | dropped | named grants reach beyond the role whenever sharing is enabled, minus disabled operations |
What
- 2.53 workspace command
upgrade:2-53:move-application-and-system-access-to-disabled-actions, run for each workspace:- objects with
APPLICATIONaccess becomeOPENand get the matching disabled actions; - objects with
SYSTEMaccess keep their stored value and get the matching disabled actions; - existing disabled actions are merged;
- the object metadata cache is recomputed;
--dry-runonly counts.
- objects with
- Standard app: the SYSTEM objects declare their disabled actions:
- all four on
agentTurn,agentMessage,agentMessagePart,agentMessageReaction,campaignDelivery,messageSuppression,recordShareandshortLink; - update, soft delete and destroy on
agentChatThreadParticipant,calendarChannelEventAssociation,messageChannelMessageAssociation,messageChannelMessageAssociationMessageFolderandworkflowAutomatedTrigger.
- all four on
- Disabled actions enforcement:
- row access policies deny a disabled operation to any subject but the owning application, including webhook delivery;
- named shares never grant a disabled operation, and objects with nothing left to grant can't be shared beyond the role;
- roles owned by the object's own application may be granted a disabled action.
- Server, removed:
- writability enforcement (API write check, row access policy check, TS_VECTOR rule);
- inherited readability, including the child snapshots on delete events;
- SYSTEM and APPLICATION gates;
- SYSTEM filters on AI tools and navigation commands;
sharingReach.
- Front:
- writability read-only logic and the command menu restriction are removed; the menu now relies on the permissions the server returns, which already exclude disabled actions;
sharingReachno longer affects sharing, and its picker is gone from object settings.
- Docs: the app docs and the agent skill no longer mention readability, writability or sharing reach.
Impacts (record sharing flag off, as in prod)
sharingReach: no impact; it only applied with the flag on.- INHERITED objects follow role access:
note,noteTarget,task,taskTarget,attachment,timelineActivity,calendarEventTarget,messageThreadTarget,agentChatThreadTarget.- A role that reads notes reads every note, including notes on records its row-level filter hides.
- Chat links (
agentChatThreadTarget) to private chats become readable, editable and deletable through role access. The record page Conversations card filters out chats the reader cannot open, so busy records can show fewer or no conversations, and other people's thread ids are exposed. Accepted until the rewrite.
- SYSTEM objects:
- Non-admin roles stay blocked through disabled actions.
- The Standard app's default role is Admin, so Admin keeps these actions. On main, even Admin could not read or write
recordShare, agent history or short links.
- Field writability:
SYSTEMfields (136 standard ones includingsearchVectoreverywhere, and about 8,700 app fields) andAPPLICATIONfields become writable by roles that can update the object.- In prod, 1,371 of the 1,731
APPLICATIONfields sit on app objects whose update is disabled, so they stay protected. - 360 fields across 20 workspace apps lose protection: 120 on the app's own
OPENobjects and 240 on standard or custom objects such ascompany,personandopportunity. - This is a data integrity loss, not a privacy one.
- In prod, 1,371 of the 1,731
- APPLICATION objects:
- Existing installs keep their protection through the migration.
- An install or sync of a manifest that still declares
APPLICATIONwithoutdisabledObjectPermissionActionsresets the disabled actions to null. That covers Slack, Teams and Fathom (slackUserLinkwould become forgeable) and the third-party apps still onAPPLICATION. - The apps can move once
twenty-sdkshipsdisabledObjectPermissionActions; the latest published version, 2.51.3, does not have it.
- User tokens carrying the owning app: they get user role ∩ app role on app-only objects, so they can no longer write them.
- Rollout window: until the workspace command reaches a workspace, its
APPLICATIONandSYSTEMobjects follow role access.
Tests
- Integration:
- the upgrade command (dry run, APPLICATION and SYSTEM moves, cache refresh, idempotent re-run);
- chat thread, channel, participant and reaction privacy;
- workflow run and conversation visibility;
- record sharing.
- Unit: server record-share, twenty-orm, api, metadata modules and workspace manager; front record sharing, side panel and read-only utils.
- Removed or reduced: specs for INHERITED, SYSTEM readability gates, APPLICATION gates, writability and sharing reach.