Skip to content

Commit 1b90fa5

Browse files
committed
docs(plugin-security): scope the write-policy exceptions in rls.mdx and the changeset's lifecycle verbs (#35917)
Contract review 7065591342 NEW-1: name public_read_write update as the second case where an authored update policy is the whole scope, and scope the controlled_by_parent detail clause to by-id writes. NEW-2: restore addresses no single row id, so it does not meet the by-id gate. NEW-4: scope the still-refused creator to rows the authored policy does not admit. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5krBqrrgxCYgjXmfbv
1 parent a82a0b1 commit 1b90fa5

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

‎.changeset/35917-by-id-widener-floor-term.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The maintainer ruled option A on #35917 (ruling comment 7063130499, 2026-11-21):
1313

1414
The floor is now dropped only where it is the filter's last term. Beside an authored write policy with a `using` it stays one term of the OR, both in the row gate before the write and in the defaulted check on the new image. What changes:
1515

16-
- On an object where an authored update or delete policy applies to the caller, a by-id update or delete of a row the caller created, where record sharing answers `allow`, is admitted again, as it was before the sharing service could replace the floor. That covers a creator who owns the row, who holds write depth over its owner, who holds Modify All, and, for an update, who holds an `edit` share or queue membership. A creator with none of these is still refused by record sharing. The lifecycle verbs move with their write class: `transfer` and `restore` with update, `purge` with delete.
16+
- On an object where an authored update or delete policy applies to the caller, a by-id update or delete of a row the caller created, where record sharing answers `allow`, is admitted again, as it was before the sharing service could replace the floor. That covers a creator who owns the row, who holds write depth over its owner, who holds Modify All, and, for an update, who holds an `edit` share or queue membership. A creator with none of these is still refused by record sharing on a row the authored policy does not admit. The lifecycle verbs move with their write class: `transfer` with update, `purge` with delete (`restore` addresses no single row id, so it does not meet this gate).
1717
- By id and by predicate now agree on the rows the floor admits. They do not agree on every row: an open row the caller neither owns nor holds a share on, which an authored policy admits, is written by id (the authored policy lifts the sharing refusal) and left out of a predicate write (the sharing bulk scope stays owner and shares). That divergence is older than this change and is not touched here.
1818
- `security/explain` reports the same record verdict for these rows.
1919
- The master check a `controlled_by_parent` detail write asks about its master row moves the same way: a master's creator, where record sharing allows the master, can now insert, update and delete its details beside the master's authored update policy.

‎content/docs/permissions/rls.mdx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,12 @@ derivation off for that class: an authored `update` predicate then joins
8181
the `update` *filter* as one more OR term, widening past the platform's
8282
owner-scoped write floor exactly as written. A write policy adds rows; it
8383
does not take away a row the floor admits (one the caller created), whether
84-
or not record sharing replaces the floor for that row. (A
85-
`controlled_by_parent` detail is the exception: its master gate judges the
86-
write instead of the floor, so a detail policy bounds every detail row.) To cap what a caller
84+
or not record sharing replaces the floor for that row. Two exceptions: on an
85+
object whose org-wide default is `public_read_write`, an `update` has no floor,
86+
so an authored `update` policy is the whole scope and does refuse the caller's
87+
own non-matching row; and on a `controlled_by_parent` detail, a by-id write is
88+
judged by its master gate instead of the floor, so a detail policy bounds every
89+
detail row written by id (a predicate write on a detail keeps the floor). To cap what a caller
8790
may do to rows they created, use a `check` (it judges the stored image) or a
8891
`beforeUpdate` / `beforeDelete` lifecycle hook (it sees the prior row as
8992
`ctx.previous`). Nothing is derived for `insert`

0 commit comments

Comments
 (0)