Repository navigation
docs(spec): the allowExport comment and permission docs say no built-in admin set grants export - #26935
Conversation
…in admin set grants export Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzebdjuVyrMYo5JVUJP
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 147 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 277a934f9025b27762d948f968a9631a8e118e70 && git checkout 277a934f9025b27762d948f968a9631a8e118e70
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 8bbdb0b46277cd975db8c395a7e1873f645a4894 d8ef7775cc9bab3f2015902b1470f94a8219ebe9 && git checkout -B drift-repro 8bbdb0b46277cd975db8c395a7e1873f645a4894 && git merge --no-ff d8ef7775cc9bab3f2015902b1470f94a8219ebe9
node scripts/docs-audit/affected-docs.mjs --json 8bbdb0b46277cd975db8c395a7e1873f645a4894 |
Contract reviewRendered 2026-10-27T22:39Z · card #26720 · PR #26935 Served-tier: Inputs read: card #26720 body and its three comments (triage 6446965516, claim 6454421056, os-dev-report 6454850955); PR #26935 body, file list (4 paths), its one comment (docs-drift 6454855878), zero review comments; the net diff ① Derived judgments
Check-runs on d8ef777 (conclusions are the gate verdicts; read with GET, times are the reads):
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
维护者速读 (席位终稿)
席位意见:接受。契约复核 PASS(6455349686),三处新文字都对照了默认权限集和导出门禁的代码。 席位核对 · ACCEPT ·
|
Requested by Yibo Wang · project thread
Fixes #26720
Clause-②: no
Metadata-protocol: none
Skills-docs: none — no
skills/**file says the built-in admin sets grant export (grep overskills/**hits only the two reference-index lines that listpermission.zod.ts); the two docs pages that said it are corrected here.维护者速读
permission.zod.ts里allowExport的注释、「Permission sets」与「Permissions matrix」两个文档页)原说内置管理员权限集带导出权限,现改为实情:不带,并写明怎么授予。admin_full_access/organization_admin都不含allowExport,管理员看不到导出按钮、导出接口回 403EXPORT_NOT_PERMITTED,文档却说有,误导管理员和 AI 作者。content/docs/permissions/permission-sets.mdx(用户最常读的一句)、content/docs/permissions/permissions-matrix.mdx、packages/spec/src/security/permission.zod.ts(只改 JSDoc,.describe()原本就对)。git grep -n -E 'carry the grant explicitly|carry .allowExport: true. explicitly|therefore carry' -- packages/spec/src/security content/docs/permissions,预期零命中(main 上是 3 处)。What changes
packages/spec/src/security/permission.zod.ts, theallowExportJSDoc: "The built-in admin sets carry the grant explicitly instead." is replaced by: the built-in admin sets (admin_full_access,organization_admin) do not carry it, an admin holding only those sets is refused export, and export is granted by binding the admin to an app or environment permission set that names each object withallowRead: true, allowExport: true. The.describe()string was already true (it never mentions the admin sets), so it is unchanged and no reference page regenerates.content/docs/permissions/permission-sets.mdx: "The built-inadmin_full_accessandorganization_adminsets carryallowExport: trueexplicitly; remove that line to get the separation." becomes: no built-in set carriesallowExport(admin, org admin, member), what the admin sees (no Export control,403 EXPORT_NOT_PERMITTED), and how to grant it.content/docs/permissions/permissions-matrix.mdx: "The built-inadmin_full_access/organization_adminsets therefore carryallowExport: truealongside their super-user bits." becomes the same correction..changeset/26720-admin-export-docs.md:@objectstack/specpatch (the JSDoc ships in the package'ssrc).The other JSDoc the order named (
objectPermissionGrants, the conjunction note at ~:248) is true as written and is left alone.Why
What each built-in set actually grants for export, on
origin/main8074feb:admin_full_access: spreadsADMIN_FULL_ACCESS_CAPABILITIES(packages/spec/src/identity/eval-user.zod.ts:115), whose'*'entry has read/create/edit/delete plusviewAllRecords/modifyAllRecordsand noallowExport(removed by the 2026-08-15 maintainer ruling; the migration entry is18.admin-export-wildcard-removed).organization_admin(and the derivedorganization_admin_no_bypass):'*'with the same bits and noallowExport(default-permission-sets.ts:391).member_default: no wildcard, noallowExport(default-permission-sets.ts:638).viewer_readonly:'*'read only, noallowExport.The gate that decides it:
resolveUserExportAllowed(packages/plugins/plugin-security/src/permission-evaluator.ts:205) is true only when some held set resolvesallowExport === truefor the object, and the REST export door (packages/rest/src/rest-server.ts,enforceExportPermission) answers403 EXPORT_NOT_PERMITTEDotherwise. So the seeded admin's 403 is the shipped behaviour, and per triage the default stays. The corrected text now gives the reader the way in: an app or environment set withallowExport: trueper object (a set carryingallowExportcannot be bound to theeveryone/guestanchors, as the same page already says).Not edited, on purpose:
18.admin-export-wildcard-removed.tsquotes the old sentence as history of what upgraders were told, and the QA checklist JSON already describes the shipped behaviour.Acceptance notes
None.
Verification
Run on head d8ef777.
Spec tests and typecheck (under os-verify-lock)
pnpm --filter @objectstack/spec test && pnpm --filter @objectstack/spec typecheck: VERDICT command-exit 0. Test Files 738 passed (738), Tests 22101 passed, 1 todo.Derived gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 96 commands. 93 exit 0, includingcheck:doc-authoring,check-adr-0087-registration --base origin/main,check:docs,check:doc-anchors, and (after building@objectstack/lint, which they import)check:doc-security-posture,check:doc-formula-expressionsandcheck:docs-transcript-drift. 3 exit 3, PREREQUISITE NOT MET (they need a full repo build, nothing was measured):spec check:skill-examples,check:dual-build-cjs-loads,check:lean-entry-closure; CI runs them.--ranreconciliation: 96 derived, 93 run, 3 NOT-MEASURED, 0 UNRUN.Human Minimum
Each item is one rule from
CONTRIBUTING.md › Human Minimum,
which links the AGENTS.md text that states it.
packages/specholds no runtime logic.pnpm lintpasses. (No formatter ran.pnpm lintwas not run locally: the diff is a comment and two prose pages, so CI's lint decides.)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (No.describe()changed, so nothing regenerates.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzebdjuVyrMYo5JVUJP