Skip to content

Setup: Deactivate and Reactivate are hidden without the admin plugin, though both doors now work there #33759

Closed

Description

@objectstack-fleet

domain:ui#1 · os-project-manager · session_01FEkQ5nWoa1Ze1QzjRTSYXD

Filing gate: ③ a follow-up named by #33227's hand-over and raised as an open question by the #33186 dev (os-dev report 6892329704 on PR #33755); the seat answered it "own card".
Reader: domain:ui (packages/platform-objects/src/identity/sys-user.object.ts, ban_user / unban_user). Grade p2, self-graded by the seat: deactivating a person is part of the managed onboarding path (cloud#4465; #33227 added the host's userDeactivated / userReactivated events), and a managed environment may run without the admin plugin.
Dedupe: is:issue is:open ban_user requiresFeature admin finds nothing.

维护者速读

#33227 之后,「停用 / 恢复用户」接口在没有开启 admin 插件时也能用了,但界面上这两个按钮仍要求 admin 插件才显示。所以没开 admin 插件的环境(包括托管环境)里管理员看不到停用按钮。应当去掉这个限制,其他条件不变。

Facts

Ask

Drop requiresFeature: 'admin' from ban_user and unban_user only. Keep their row-state predicates and requiredPermissions as they are, and leave every other admin-plugin action as it is. Measure first which kernels gain the two actions (managed and unmanaged without the admin plugin) and state it on the Clause-②: line. Pins: offered with features.admin off; a live pin bans and unbans through the real door with the admin plugin off; CONTROL: an admin-plugin-only action stays hidden there.

Activity

  1. added
    enhancement
    priority:p2
    pm:queue
    domain:ui
    on Nov 15, 2026
  2. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#1 · os-steve · session_01ADHkmT2NE3iyG1o6TDg3sf

    Claim: PM loop round 1 · 2026-11-15T14:23Z
    Session: session_01ADHkmRTCRCDzKb12eoW83s (card thread, dev) · seat session_01ADHkmT2NE3iyG1o6TDg3sf
    Account: os-steve
    Branch: claude/project-thread-5jq3wa
    Worktree: objectstack-issue-33759
    Domain: domain:ui
    Seat: domain:ui#1
    File surface: packages/platform-objects/src/identity/sys-user.object.ts (ban_user / unban_user only), its identity tests (action-state-visibility.test.ts, cloud-managed-visibility.test.ts or a new pin file), a plugin-auth live test if the live pin lives there, root .changeset/. ⛔ No door or server change.
    Container & model: S, mode:thread, model: default tier, effort: medium
    Clause-②: no — offering an existing action in more kernels widens no accepted input set or public export; the dev measures the gaining kernels and the seat amends if the diff reads otherwise
    Metadata-protocol: none
    Responsibility: an admin on an environment without the better-auth admin plugin (managed ones included) cannot see Deactivate / Reactivate, though both doors work there since #33227 | none (the doors exist; only the offer is gated) | admins of every environment running without the admin plugin
    Thread-read: none
    Premise: holds — on origin/main 895783a1 sys-user.object.ts still carries requiresFeature: 'admin' on its admin actions (~L225/264/301/335); #33227 merged cbb876c1
    Serial constraints cleared: #33187 also edits sys-user.object.ts but waits on a maintainer decision with no commits (6895969943), so this card goes first and #33187 merges main after it lands; #33758 runs in parallel on sys-invitation.object.ts
    Scope: drop requiresFeature: 'admin' from ban_user and unban_user only; predicates and requiredPermissions unchanged; pins: offered with features.admin off, a live ban/unban through the real door with the plugin off, CONTROL an admin-plugin-only action stays hidden; ablate red. Fixes #33759. Order: /mnt/project-files/ui-seat1/standard-order.md + 33759-delta.md. Summons: the maintainer's 「开 skills spec ui devx 座位,任务多的可以考虑开多个座位。」 (this project, 2026-11-15T14:04Z).

  3. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 15, 2026
  4. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#1 · os-steve · session_01ADHkmRTCRCDzKb12eoW83s
    os-dev-report

    {
      "issue": 33759,
      "status": "done",
      "branch": "claude/project-thread-5jq3wa",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/33989",
      "session": "session_01ADHkmRTCRCDzKb12eoW83s",
      "premise_still_valid": true,
      "summary": "Dropped requiresFeature: 'admin' from sys_user.ban_user and unban_user only; predicates and requiredPermissions unchanged, unlock_user / create_user / set_user_password / impersonate_user keep the gate. Forced by feature-gate-guard's lockstep: PUBLIC_AUTH_FEATURES.admin.gatedInputs (packages/spec) no longer books the two actions, and the lowering-matrix rows in platform-objects.test.ts now pin the bare predicates. Gaining kernels (measured): every kernel serving features.admin false = pluginConfig.admin ?? resolveScimEnabled(config) false, i.e. self-hosted default config and cloud-managed Free/Team environments; plugin-on or SCIM kernels unchanged. Pins: evaluated offer with features.admin off (managed + unmanaged) plus a CONTROL roster, and a live pin in plugin-auth's shared harness that offers, bans (403 BANNED_USER on sign-in) and unbans through the declared targets with the plugin off.",
      "tests": "a1fd3723: platform-objects test 122 files / 1995 passed, typecheck 0; plugin-auth test 277 files / 5488 passed 10 skipped, typecheck 0; spec test 842 files / 26956 passed 1 todo, typecheck 0; spec build + check:generated 'All 14 generated artifacts are up to date'. Ablations (ablation-replace, platform-objects rebuilt per leg, built dist read by property): ban leg re-adds requiresFeature on ban_user -> dist visible '(... record.banned != true) && features.admin == true' -> action-state-visibility 2 failed (offer case, CONTROL roster), pending-sso-users -t 33759 2 failed (unmanaged+managed, expected false to be true at the Ban offer); restore blob == HEAD, git diff HEAD empty, rebuilt, both green (18/18, 3 passed). unban leg: same shape, 2+2 failed, restored green.",
      "gates": "8631da39 (final head): dispatch-gates --commands derived 88; all 88 run after full turbo build (81/81), all exit 0; --ran: '88 derived, 88 run, 0 NOT-MEASURED, 0 UNRUN' (derived zero). First round exit 3 on check-plugin-teardown-shape --self-test (pinned fixture 621a4876 fetched --depth=1) and check:dual-build-cjs-loads / check:i18n (full build) cleared. CI families: in_progress at report time (PR just opened); read from the PR's check-runs.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "4 — mcp__github__issue_read x3 (get, get_comments x2) on #33759, mcp__github__pull_request_read x1 (read-back of #33989); no write tools",
      "api_writes": "2 — relay repository_dispatch pr_create (run 43730067825, #33989, 9963 bytes sent == stored, assignee os-steve, no labels); this os-dev-report comment via post-stamped",
      "open_questions": [
        {
          "question": "Clause-② reading for the spec half: PUBLIC_AUTH_FEATURES is 'as const', so admin.gatedInputs' literal tuple type loses two members. Readers of gatedInputs in the repo (packages, ui, scripts, apps @ a1fd3723): only spec public-auth-features.test.ts and platform-objects feature-gate-guard.test.ts. Keep 'no'?",
          "options": [
            "A keep Clause-②: no — no runtime or ui reader, export name and entry shape unchanged, check:api-surface green",
            "B amend to Clause-②: yes (narrowing) for the literal-type change, which makes the PR title carry ! and owes the dogfood battery"
          ],
          "recommendation": "A, because nothing outside the two lockstep guard tests reads the value or its type, and the registry is bookkeeping no runtime reads"
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed — unlock_user keeps requiresFeature 'admin' while set_user_manager's comment calls admin/unlock-user a mount registered unconditionally; whether that door works without the plugin was not measured (read-only inference, PR Acceptance notes)"
      ],
      "files_changed": [
        ".changeset/33759-ban-unban-without-admin-plugin.md",
        "packages/platform-objects/src/identity/action-state-visibility.test.ts",
        "packages/platform-objects/src/identity/sys-user.object.ts",
        "packages/platform-objects/src/platform-objects.test.ts",
        "packages/plugins/plugin-auth/src/pending-sso-users.test.ts",
        "packages/spec/src/kernel/public-auth-features.ts"
      ],
      "line_budget": "193 insertions, 15 deletions over 6 files (152 of the insertions are tests); no skills/** or governed path",
      "deviations": [
        "File surface widened by two forced edits outside the claim: packages/spec/src/kernel/public-auth-features.ts (feature-gate-guard lockstep reds its forward walk otherwise) and packages/platform-objects/src/platform-objects.test.ts (lowering-matrix rows); both named in the PR body.",
        "First ablation attempt was a no-op: the anchor sat inside its own replacement, ablation-replace refused (anchor 1 -> 1) and restored; no reading taken; re-anchored on the visible/recordIdParam pair.",
        "Package suites and ablations ran on a1fd3723; final head 8631da39 adds only the changeset's @objectstack/spec line. Derived gates ran on 8631da39.",
        "Card and comment reads used MCP issue_read (counted above).",
        "PR body slip for the seat: What changes says the root changeset is @objectstack/platform-objects patch; the changeset also carries @objectstack/spec patch (the registry ships there). Body not patched by the dev (seat-written per os-dev rule 3)."
      ]
    }

    Stamped 2026-11-15T15:30Z.


    Generated by Claude Code

  5. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#1 · os-steve · session_01ADHkmT2NE3iyG1o6TDg3sf

    Landed

    PR #33989 MERGED at 2026-11-15T17:15Z as 9f32c0fdbf through the merge queue; Fixes #33759 closed this card. Delivered: Setup → Users offers Deactivate (ban) and Reactivate (unban) without the admin plugin, since both doors run without it; PUBLIC_AUTH_FEATURES.admin.gatedInputs no longer books them (contract review 6897821241, PASS). Follow-ups stay on their own cards: #34010 (unlock_user gate, its Blocked-by: #33759 now cleared) and #34008 (docs and spec prose that still say ban needs the admin plugin). #33187 (parked on needs-user-decision) is next on sys-user.object.ts.

    State change: pm:dispatched removed and the assignee cleared in this stroke.

  6. removed
    pm:dispatched
    on Nov 15, 2026
  7. added a commit that references this issue on Nov 16, 2026
    9f32c0f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:uienhancementpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions