Skip to content

console: hide the add / remove controls for permission sets outside a delegated security admin's scope (split from #34700) #34741

Closed
0 of 1 issue completed

Description

@objectstack-fleet

repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

Filing gate ①: split from #34700 by area o2-I's premise reading on origin/main a34eb071 (item ③; the server half stays on #34700, see its premise comment 6943935258). Dedupe: AssignedUsersSection delegated scope controls; no open card.

Suggested-grade: p1 (inherits #34700) · domain:ui

维护者速读

  • 现象:委派安全管理员在用户的权限集分配处,能看到并点「添加 / 移除」超出自己委派范围的权限集(例如 admin_full_access、官员集合)。服务端已经拒绝(403 DELEGATION_SCOPE_VIOLATION),但界面先让人点、再报错。
  • 为什么要修:三员分立下,安全管理员不该被引导去做一定会被拒的操作。
  • 需要你做的:无(分诊定级)。

Change

In the console's permission-set assignment UI (AssignedUsersSection and the add picker), hide or disable add / remove for sets outside the caller's delegated scope, reading the same scope the server's delegated-admin-gate judges (no second copy of the rule in the client). A pin per control.

Done when

A delegated security admin sees no add / remove control for a set outside their scope; an unrestricted admin sees them as today.

Sub-issues

Sub-issues

0 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    bug
    finding
    on Nov 17, 2026
  2. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → p1 · domain:ui · pm:queue · 2026-11-17T09:23Z

    ⛔ Not a claim.

  3. added
    domain:ui
    pm:queue
    priority:p1
    on Nov 17, 2026
  4. objectstack-fleet commented on Nov 18, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Regraded p1 → p2 by the maintainer's grading principle of 2026-11-18, accepted in triage's session (「刚才你建议的分级调整,我全部接受」).

    The principle, in order:

    1. What a new user or a prospect meets first (looks and the main flow), the cloud core (Turso, hosted sign-up and onboarding, hosted install and upgrade, plans) and a developer's first contact come first.
    2. Data loss or a permission breach in normal use stays first.
    3. Details and rare configurations are improved over time.
    4. Internal items are frozen.

    Why this card: enterprise-only detail (delegated security-admin controls).

  5. added
    priority:p2
    and removed
    priority:p1
    on Nov 18, 2026
  6. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

    Claim: area ux-1 round 7 · 2026-11-19T06:30Z
    Session: session_01Utp6CbSphdunq2aJq7ktuY
    Account: os-bill
    Area: ux-1
    Branch: claude/issue-34741-delegated-scope-controls
    Worktree: objectstack-issue-34741
    Domain: domain:ui
    Seat: repo:objectstack#5
    File surface: ui/packages/app-shell/src/views/metadata-admin/AssignedUsersSection.tsx and its add picker, their tests, an i18n catalogue line for a reason if one is shown, root .changeset/. packages/** read-only.
    Container & model: M, mode:subagent, model: default tier (dispatch-gates --tier: no path-derived mandate), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the permission-set assignment UI offers add / remove on sets outside a delegated security admin's scope; the server refuses them (403 DELEGATION_SCOPE_VIOLATION) | the server's delegated-admin-gate already decides, and describeDelegableScope (REST my-delegable-scope, read in the console through useAuth().describeDelegableScope, as InviteMemberDialog does) reports the caller's scopes[].assignablePermissionSets | delegated security admins in enterprise (separation-of-duties) deployments
    Thread-read: 6969812779
    Premise: holds; no server read door needed (premise reading reported to the seat before claim).
    Pre-claim lane: ui/packages/app-shell/** → domain:ui, area ux-1.
    Pre-claim deps: none open (split from #34700, whose server half already refuses).
    Prior rulings read: ADR-0090 D6/D12 (delegated administration; the server gate is the authority) — this card only hides controls the server already refuses, reading the server's own report, no client copy of the rule; no conflict.
    Serial constraints cleared: no other ux-1 card touches AssignedUsersSection.tsx; the dev runs overlap-check before the first push.
    Scope: a delegated security admin sees no add / remove for a set outside their scope; a tenant-level admin (isTenantAdmin) and an organization admin see controls as today; no report (degraded or loading) keeps today's controls and the server decides; one pin per control + per persona, ablation. Fixes #34741.

  7. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 19, 2026
  8. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY
    os-dev-report

    {
     "issue": 34741,
     "status": "done",
     "branch": "claude/issue-34741-delegated-scope-controls",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/35389",
     "session": "session_01Utp6CbSphdunq2aJq7ktuY",
     "premise_still_valid": true,
     "summary": "AssignedUsersSection now reads the caller's own delegable-scope report (useAuth().describeDelegableScope, as InviteMemberDialog does) and, where the report names delegated scopes and the set's name is in none of their assignablePermissionSets, draws no Add, no picker, no Remove (direct and unresolved rows) and no click-Add sentence; holders are still listed. Tenant-level admin, a report with no delegated scope (how the report draws an organization admin), and no / loading / failed report keep today's controls. The report is re-read per active organization and a report read for another organization is never answered; the only client judgement is allowlist membership of the set name (ADR-0090 D6/D12). Deviations: the report cannot tell an organization admin who also holds a delegated scope from a delegate, so that caller is read as a delegate (open question 1); the PR's 维护者速读 follows os-dev's six-line form, which conflicts with the dispatch's four-line cap (os-dev wins on conflict; named here). origin/main merged once before the PR (a336d05999).",
     "tests": "Head a336d05999. cd ui && pnpm exec vitest run --maxWorkers=2 (the nine AssignedUsersSection files, setupHoldersGrant-12082, plugin-form affordanceGrantMap-12082, PermissionMatrixEditor.holderSections-32537): Test Files 12 passed (12), Tests 146 passed (146), lock VERDICT command-exit 0. pnpm --filter @object-ui/app-shell type-check (both tsc projects): VERDICT command-exit 0. Ablations via scripts/ablation-replace.mjs (tests import the component from source, no build in between; each leg restored, blob == HEAD, git diff HEAD empty): (1) allowlist test -> return false: 4 failed | 24 passed (28), the three delegate pins + org-switch pin; (2) carve-out reduced to if (!report): 2 failed (tenant admin, org admin controls); (3) org keying dropped: 1 failed (org-switch pin). Full app-shell suite left to CI Test UI (dispatch fence).",
     "gates": "Local: node scripts/pm/dispatch-gates.mjs --commands derived 38 families at a336d05999; all 38 run, each exit 0 (vitest scripts/ under the lock); --ran reconciliation exit 0: 38 derived, 38 run, 0 NOT-MEASURED (derived zero). Also: ui check:new-line-citations exit 0 (0 new); eslint on the two changed files exit 0 (0 errors); overlap-check VERDICT clean exit 0; control-byte self-scan no hits. CI on PR #35389 head a336d05999 at report time: in_progress (Type Check, Lint, Check Changeset, Governed Surface Queue Guard, PR-body guards running; opt-in/queue jobs skipped) — not waited on.",
     "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
     "mcp_calls": "0",
     "api_writes": "2 — relay stroke fw-20261119T074612Z-02b753 (POST /repos/objectstack-ai/objectstack/dispatches -> pr_create: POST /pulls + POST /issues/35389/assignees os-bill); post-stamped POST /repos/objectstack-ai/objectstack/issues/34741/comments (this report). git push to the claim branch is not a REST write.",
     "open_questions": [
      {
       "question": "The delegable-scope report cannot tell an organization administrator who also holds a delegated adminScope from a pure delegate; such a caller is read as the delegate and loses Add/Remove here on sets outside its allowlists but inside the organization boundary (the gate's org-admin branch would admit them). The dispatch said to keep controls where the report cannot tell, which read literally would void the card for every delegate.",
       "options": [
        "A Keep as shipped: callers with delegated scopes are read as delegates; org admins holding no scope (the shipped organization_admin sets carry none) keep controls. Cost: none now; rare overlap persona loses this surface's buttons.",
        "B File a contract card: DelegableScope gains an organization-administrator flag (or a top-level list of grantable sets) from describeDelegableScope, then the client keeps controls for it. Cost: spec + plugin-security + client, S-M, needs_decision on the spec shape.",
        "C Infer org admin client-side from placeable units outside every scope subtree. Cost: a second copy of the server derivation, against the ruling; not recommended."
       ],
       "recommendation": "A now, B only if the maintainer wants the overlap persona served, because the overlap needs an explicit extra grant to an org admin and B is a contract change outside this fence."
      }
     ],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none · noted, not filed — PositionHoldersSection has the same shape (Add/Remove offered for positions the report's assignablePositions leaves out); not reproduced here, outside the file surface; listed in the PR's Acceptance notes"
     ]
    }
  9. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

    Close-out · 2026-11-19T08:30Z: PR #35389 merged as 438ff47 (ACCEPT 7003480629, landing 7003501359); the card closed on merge. Same-shape gap on positions stays open as sub-issue #35393 (p3). pm:dispatched removed.

  10. removed
    pm:dispatched
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxbugdomain:uifindingpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions