Repository navigation
Permanent admins, set in the app by a configured admin - #88
Merged
Merged
Conversation
An admin granted in Settings can be marked permanent: they cannot be removed until the flag is cleared, and only the admins named in server configuration (Admin:BootstrapLoginIds) can set or clear it. The flag lives on AdminGrants, not in committed configuration, so admin login IDs are not published in the public repository. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
Why
Some admins added in Settings should be impossible to remove by accident. Until now only the admins in
Admin__BootstrapLoginIdswere protected, and that's Azure configuration. #87 tried a committed list, but that would have published admin login IDs in this public repo, so it was closed.What changed
AdminGrantsgets aPermanentflag. A permanent admin can't be removed in the app: the server refuses and the Remove button is hidden.Admin:BootstrapLoginIds) can turn the flag on or off. They use Make permanent / Clear permanent in Settings → Admins. Other admins see the "permanent" badge but no control.GET /api/admin/adminsnow also returnscanSetPermanent, and each entry returnspermanent. New endpoint:PUT /api/admin/admins/{loginId}/permanentwith body{ permanent }.Validation
dotnet test --filter "Category!=CorpusParity&Category!=LiveApi": 831 passed. New tests cover:npm test -- --run: 218 passed. New tests cover the Make permanent flow (Remove disappears) and a non-configured admin seeing no control.tsc -bandnpm run lintare clean.Deployment notes
PermanentAdminsadds onebitcolumn, default0, so existing admins start not permanent.🤖 Generated with Claude Code