Skip to content

docs(permissions): clarify View/Modify All × OWD interaction and posture-gated RLS bypass#3008

Merged
os-zhuang merged 1 commit into
mainfrom
claude/viewall-modifyall-public-read-write-kej9sv
Jul 16, 2026
Merged

docs(permissions): clarify View/Modify All × OWD interaction and posture-gated RLS bypass#3008
os-zhuang merged 1 commit into
mainfrom
claude/viewall-modifyall-public-read-write-kej9sv

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Answers the clarification asked in #3005 by documenting the actual (intentional) semantics, verified against the 15.0.0 enforcement chain.

What the reporter observed, and why

With OWD public_read_write:

  1. Reads are org-wide and viewAllRecords makes no difference — expected: public_read_write is the org-wide read+write baseline at the sharing layer (plugin-sharing/src/sharing-service.ts effectiveSharingModel → no read filter). The super-user bits widen the sharing axis to depth org; under this OWD there is nothing left to widen.
  2. modifyAllRecords: true does not grant cross-owner update/delete — the blocker is not the OWD/sharing layer (which is write-open under public_read_write) but the baseline member_default RLS policies owner_only_writes / owner_only_deletes (created_by == current_user.id, applicability domain org_member), enforced by the pre-image write check. The super-user RLS short-circuit is posture-gated (ADR-0066 D2 revised ①): it applies only to access: { default: 'private' }, platform-global (tenancy.enabled: false), or better-auth-managed objects — never to ordinary tenant business objects (plugin-security/src/security-plugin.ts computeLayeredRlsFilter).

Neither bit is an enterprise capability: both are enforced by the open-source plugin-security. The only enterprise-resolved axis (the #2920 "fail-closed to owner-only" note) is the hierarchy depth scopes own_and_reports / unit / unit_and_below (ADR-0057 IHierarchyScopeResolver).

Changes

  • content/docs/permissions/sharing-rules.mdx — new subsection under the OWD table: how viewAllRecords / modifyAllRecords interact with each OWD value, what they never override (baseline member RLS on ordinary business objects, the Layer 0 tenant wall), the open-core boundary, and the "owners edit their own, supervisors edit all" recipe (OR-widening RLS policy bound to a supervisor position, or access: private posture).
  • content/docs/permissions/permissions-matrix.mdx — the Super-user bypass callout previously said the bits "bypass ownership and sharing" unconditionally, which is exactly the expectation 澄清:viewAllRecords / modifyAllRecords 在 public_read_write 下失效,是否为开源版有意设计? #3005 formed; added the posture-gate caveat with pointers to ADR-0066 D2 ① and the sharing docs section above.

Docs-only change; no runtime behavior touched.

Closes #3005 (clarification — behavior is by design).

🤖 Generated with Claude Code

https://claude.ai/code/session_019jw7PHSUa3rtRTnK6dwedX


Generated by Claude Code

…ure-gated RLS bypass (#3005)

Answers the #3005 clarification: under public_read_write the sharing
baseline is already org-wide, so viewAllRecords has nothing to widen on
that layer; and the super-user RLS short-circuit is posture-gated
(ADR-0066 D2 revised ①) — on ordinary tenant business objects the
member_default owner-scoped write policies still narrow org_member
holders even when modifyAllRecords is granted. Neither bit is an
enterprise capability; only the hierarchy depth scopes are
enterprise-resolved (ADR-0057). Adds the supervisor-writes-all recipe.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019jw7PHSUa3rtRTnK6dwedX
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jul 16, 2026 4:47am

Request Review

@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation and removed size/s labels Jul 16, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review July 16, 2026 04:53
@os-zhuang
os-zhuang merged commit a81b1a9 into main Jul 16, 2026
15 checks passed
@os-zhuang
os-zhuang deleted the claude/viewall-modifyall-public-read-write-kej9sv branch July 16, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

澄清:viewAllRecords / modifyAllRecords 在 public_read_write 下失效,是否为开源版有意设计?

2 participants