Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/public-sharing-block-doc-standing-policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@objectstack/spec": patch
---

The block-level `publicSharing` TSDoc now states the standing policy, not just the mint half.

`ObjectSchema.publicSharing`'s block comment said that with the block omitted or `enabled:false` "the platform refuses to create share-link rows for this object — independent of any permission the caller holds". Literally true, and the mint half only. Since #14033 the switch is a **standing policy held again at every redemption**: `resolveToken` re-reads the object's current block, so a block that is off refuses every token on it — those minted while it was on, and those minted through the system-context / `permissive` mint bypass alike.

That correction already landed on the `enabled` property comment thirty lines below, on `IShareLinkService.resolveToken`'s `null`-cause list and in design note 7 of `contracts/share-link-service.ts`. The block-level sentence was left behind, so the same file stated one fact two ways with no signal telling a reader which was current — and the block doc is the more likely landing site of the two, since it is what a reader scanning the object schema for the sharing policy meets first and it carries the `@see` pointers that make it read as the block's orientation text.

The sentence now names both halves and points at `enabled` for the full statement rather than restating the mechanism a third time. Comment text only: no schema arm, bound, default, `.describe()` string or runtime behaviour moves, and no generated artefact changes. The text ships because `packages/spec` publishes both `src/**/*.zod.ts` and unminified bundles that carry source comments verbatim.
9 changes: 7 additions & 2 deletions packages/spec/src/data/object.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2231,8 +2231,13 @@ const ObjectSchemaBase = strictObject(
* Opt-in declaration that records of this object MAY be published via
* an opaque capability token (Notion / Google Docs / Figma "anyone with
* the link" style). When omitted or `enabled:false`, the platform
* refuses to create share-link rows for this object — independent of
* any permission the caller holds.
* refuses to create share-link rows for this object AND refuses to
* resolve any that already exist — a STANDING policy held at every
* redemption, not a mint-time check (#14033), so links minted while the
* block was on stop serving the moment it is turned off, those minted
* through the system-context / `permissive` mint bypass included. Both
* halves are independent of any permission the caller holds; see
* `enabled` below for the whole statement.
*
* Distinct from {@link sharingModel}, which governs *principal-based*
* sharing (share with specific users / teams / roles). A single object
Expand Down
Loading