Repository navigation
fix(app-shell): a permission set outside a delegated security admin's scope offers no Add and no Remove - #35389
Conversation
…rs no Add and no Remove Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY Co-authored-by: Claude <noreply@anthropic.com>
…rols Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY Co-authored-by: Claude <noreply@anthropic.com>
…rganization it was read in Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY Co-authored-by: Claude <noreply@anthropic.com>
…legated-scope-controls
|
repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY Final head for L1:
|
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对 — ACCEPT (L1-a) · repo:objectstack#5 · head
|
|
repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY Landing · area ux-1 · 2026-11-19T08:10Z
ACCEPT 7003480629 (L1-a) at head |
Requested by Bill · project thread
Fixes #34741
Clause-②: no
Metadata-protocol: none
Seat
repo:objectstack#5· os-bill · area ux-1 ·session_01Utp6CbSphdunq2aJq7ktuY· claim 7001679657维护者速读
What changes
AssignedUsersSection(the Assigned users section of a permission set, and the member picker its Add opens) now reads the caller's own delegable-scope report —my-delegable-scope, throughuseAuth().describeDelegableScope, the readInviteMemberDialogmakes — and reflects it (ADR-0090 D6/D12: the server gate decides, the client only reflects the server's own report):assignablePermissionSets, the section offers no Add, mounts no picker, draws no Remove on a direct-grant row or an unresolved-grant row, and drops the "click Add" sentence from the empty state. The holders are still listed.isTenantAdmin); a report with no delegated scope, which is how the report draws an organization administrator; and no report at all — while it is read, where no runtime serves it, or where the read fails (fail-open UI, the server decides).outsideDelegatedScopeis the whole client-side judgement: membership of the set's name in the report's allowlists. No business-unit subtree, package-holder or containment logic is copied into the client.What the UI pre-empts, and what it does not. Pre-empted: an Add or Remove of a set outside every allowlist the caller's scopes carry — the refusal the gate gives as
DELEGATION_SCOPE_VIOLATION("permission set ... is not in the scope's allowlist"). Not pre-empted, still refused by the server in its own words: a target user outside the delegate's business-unit subtree (per user, not per set); a scope that lists the set but lacksmanageAssignments; an allowlist entry that names the set at another package holder (ADR-0150); the strict-containment refusal for a set that itself carries anadminScope; and a delegate with no active organization (its scopes resolve to none on the report, so the controls stay and the server refuses).Tests
Pins are a new top-level
describein the shared harnessAssignedUsersSection.test.tsx, which now stands@object-ui/auth'suseAuthin with a settable report and active organization (default: no report, no organization — the earlier cases are unchanged):Targeted tests on a336d05 — 12 files, 146 tests pass
Every file that reads this component ran (the nine AssignedUsersSection files, the setup holders grant pin, the affordance-to-grant census, the permission-set editor's holder sections). The census keys the two write sites as
AssignedUsersSection > addUsers :: createandAssignedUsersSection > removeUser :: delete; both names are unchanged. The full app-shell suite is left to CI's Test UI.Type check — app-shell, both projects
Ablations (one-shot, through scripts/ablation-replace.mjs, each restored to the HEAD blob with an empty git diff HEAD)
The tests import the component from source (relative import), so no build sits between a mutation and the run.
Acceptance notes
organization_adminsets carry none) keeps the controls. Closing the gap needs the report to say it — e.g. an organization-administrator flag or a top-level list of the sets the caller may grant — which is a contract change inpackages/specand outside this card's fence; it is raised with the seat rather than worked around in the client.InviteMemberDialogbehaves; nothing is written in between without the server deciding.PositionHoldersSection) has the same shape — Add / Remove offered on positions the report'sassignablePositionsleaves out — and is not changed here (outside this card's file surface).content/docs/frontend/page) is not touched: outside this card's file surface; no prop, export of the package or locale key changed.Verification
Derived gate families on a336d05 — 38 derived, 38 run, all exit 0
Other local checks
Dogfood battery: n/a (no
!in the title, no narrowing arm).🤖 Generated with Claude Code
https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY