Skip to content

docs(permissions): rewrite content/docs/permissions/* to the Permission Model v2 vocabulary (ADR-0090)#2717

Merged
os-zhuang merged 1 commit into
mainfrom
claude/permissions-docs-v2
Jul 9, 2026
Merged

docs(permissions): rewrite content/docs/permissions/* to the Permission Model v2 vocabulary (ADR-0090)#2717
os-zhuang merged 1 commit into
mainfrom
claude/permissions-docs-v2

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Summary

Brings the hand-written permission docs in line with Permission Model v2 (ADR-0090, landed across #2697/#2708/#2711/#2716). This closes the highest-value slice of the docs-drift list those PRs flagged — the pages that actively documented the old model, including one documented fail-open default that P1 inverted.

Page-by-page

  • roles.mdxpositions.mdx — flat positions (岗位), no parent tree; the hierarchy narrative moves to business units; assignment BU anchor; built-in identity positions; everyone/guest audience anchors and their binding tier.
  • profiles.mdx — migration tombstone: the Profile concept was removed (D2); a table maps each former use to everyone-anchor bindings, isDefault suggestions, and position-bound sets.
  • permission-sets.mdx — rewritten as the single capability container: union semantics, access depth (moved here from the old profiles page), capabilities, built-in sets with the additive member_default baseline (D5), the governed assignment tables (D12), isDefault, adminScope with a worked 华东 example, package provenance.
  • sharing-rules.mdxcorrects the documented OWD default: the page said "the default is open, not private"; since D1 an unset/unknown sharingModel fails closed to private and the D7 linter makes it a build error. Also: canonical four values only, externalSharingModel dial (D11), recipient types position / unit_and_subordinates / team.
  • authorization.mdx — position vocabulary in the three-way separation; D1/D11 in the enforcement chain; delegated-admin gate in the anti-escalation paragraph; new Explaining a decision section (D6 security.explain); the D7 publish linter and the access-matrix snapshot added to the governance section; ADR-0090 in the index.
  • permissions-matrix.mdx — role-hierarchy section replaced with business-unit hierarchy & positions (mermaid updated); isProfile removed from all samples; position recipients; evaluation-order step 1 reworded.
  • permission-metadata.mdxisProfileisDefault/adminScope in the schema table; "Profile vs Permission Set" replaced with union semantics; current_user.positions.
  • index.mdx — five-concepts overview paragraph, v2 implementation-status callout, best-practice sections (permission sets / positions / BU depth), checklist and real-world example updated.
  • access-recipes.mdx / field-level-security.mdx — link and heading fixes.
  • Nav (meta.json): rolespositions; no dangling /docs/permissions/roles links remain in content/.

Authoritative reference: docs/design/permission-model.md · decision record: ADR-0090.

Verification

  • pnpm turbo build --filter=docs green (full docs-site build over the rewritten pages)
  • grep sweeps: no remaining isProfile (outside the migration note), role_and_subordinates, sys_role*, type: 'role', or current_user.roles in content/docs/permissions/
  • Content-only change — no code, no changeset needed

🤖 Generated with Claude Code

https://claude.ai/code/session_012oLzaP8n7A3YKFmgaHWC8H


Generated by Claude Code

…on Model v2 vocabulary (ADR-0090)

- roles.mdx → positions.mdx: flat positions (岗位), assignment BU anchor,
  built-in identity positions, everyone/guest audience anchors; the
  hierarchy narrative moves to business units.
- profiles.mdx → migration tombstone: the Profile concept was removed
  (D2); maps each former use to everyone-anchor bindings, isDefault
  suggestions, and position-bound sets.
- permission-sets.mdx: rewritten as the single capability container —
  union semantics, access depth (moved here from profiles), capabilities,
  built-in sets (additive member_default baseline), governed assignment
  tables, isDefault suggestion, adminScope delegated administration,
  package provenance.
- sharing-rules.mdx: OWD default corrected to fail-closed private (D1 —
  the page previously documented the pre-v2 fail-open default), canonical
  four values only, externalSharingModel dial (D11), recipient types
  position / unit_and_subordinates / team.
- authorization.mdx: position vocabulary, D1/D11 in the enforcement
  chain, delegated-admin gate in anti-escalation, new explain-engine
  section (D6), D7 linter + access-matrix snapshot added to governance,
  ADR-0090 in the index.
- permissions-matrix.mdx: role-hierarchy section replaced with
  business-unit hierarchy & positions; isProfile removed from samples;
  position recipients.
- permission-metadata.mdx: isProfile → isDefault/adminScope in the field
  table; union-semantics section replaces Profile-vs-Set;
  current_user.positions.
- index.mdx: five-concepts overview, v2 implementation-status callout,
  best practices and example updated.
- access-recipes.mdx / field-level-security.mdx: link + heading fixes.

Authoritative reference: docs/design/permission-model.md; decision
record: ADR-0090 (P1 #2697, P2 #2708, P3 #2711, P4 #2716).

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

vercel Bot commented Jul 9, 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 9, 2026 8:18am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation size/xl labels Jul 9, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review July 9, 2026 08:35
@os-zhuang
os-zhuang merged commit 5a92341 into main Jul 9, 2026
15 checks passed
@os-zhuang
os-zhuang deleted the claude/permissions-docs-v2 branch July 9, 2026 08:35
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 size/xl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants