Skip to content

admin: forget a user (row, prefs, credential refs, tokens, sessions) - #41

Merged
selic merged 1 commit into
mainfrom
feat/delete-users
Aug 17, 2026
Merged

admin: forget a user (row, prefs, credential refs, tokens, sessions)#41
selic merged 1 commit into
mainfrom
feat/delete-users

Conversation

@selic

@selic selic commented Aug 14, 2026

Copy link
Copy Markdown
Member

Prod accumulated login rows nobody wants — e.g. Admin.Adam.Levin, an Azure admin account that signed in once, has no role and no groups. There was no way to remove one.

DELETE /api/users/:id removes the row, its group-derived roles (FK cascade), the personal prefs and credential refs keyed to that identity, revokes live refresh tokens, and drops the principal's live MCP sessions.

Deliberately not an access revocation, and both the API note and the UI confirm say so: anyone still in a mapped group gets a fresh row at their next login. This is for clearing accounts that will not come back.

Secret-store values behind credential refs are not touched (that is #9), so the response says so when there were any rather than implying a clean wipe.

The Users tab also grows a From groups column — with additive roles (#28) an override and the group-derived set are different things, and the old single Role column could not show both.

Tests: deletion clears row + prefs + login roles and 404s on a second try; non-admins get 403 and the row survives.

npm run build clean, npm test 282 passed. Not deployed.

🤖 Generated with Claude Code

Prod accumulated login rows nobody wants — e.g. an Azure admin account that
signed in once and has no role and no groups. There was no way to remove one.

DELETE /api/users/:id removes the row, its group-derived roles (FK cascade),
the personal prefs and credential REFS keyed to that identity, revokes any live
refresh tokens, and drops the principal's live MCP sessions.

Deliberately NOT an access revocation, and the UI says so: anyone still in a
mapped group gets a fresh row at their next login. This is for clearing
accounts that will not come back. Secret-store values behind credential refs
are not touched — that is issue #9 — so the response says so when there were
any, instead of implying a clean wipe.

The Users tab also grows a "From groups" column, since with additive roles an
override and the group-derived set are different things and the old single
"Role" column could not show both.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@selic
selic merged commit 895991f into main Aug 17, 2026
1 check passed
@selic
selic deleted the feat/delete-users branch August 17, 2026 10:10
selic pushed a commit that referenced this pull request Aug 20, 2026
Minor: admins can forget a user - row, prefs, credential refs, refresh tokens
and live sessions in one call (#41); tool discovery recovers from an upstream
restart instead of silently emptying that upstream's half of the catalog, and
a failed discovery is surfaced as lastError rather than looking healthy (#42,
#46); a personal credential written or deleted on /me drops the caller's pooled
per-user link so the change takes effect immediately (#44, #46).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant