admin: forget a user (row, prefs, credential refs, tokens, sessions) - #41
Merged
Conversation
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/:idremoves 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 buildclean,npm test282 passed. Not deployed.🤖 Generated with Claude Code