Repository navigation
[2.1] Fixes #37701: Reserve the Admin role name and label the admin flag apart from roles (backport 2.1 #37702) - #38122
Merged
Conversation
manerow
requested review from
ShaileshParmar11
and removed request for
a team
November 18, 2026 13:05
Code Review ✅ Approved 🟡 Medium riskRejecting case-insensitive Admin role creation changes the role API’s accepted inputs and could prevent clients from creating roles with that name. Reserves VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
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.
Describe your changes:
Backport of #37702 to
2.1. Fixes #37701.Admin access is the
isAdminflag on a user or bot, not a role, but the role editors list the flag as an option called "Admin". A custom role namedAdmintherefore showed up as a second, identical "Admin" option. The server now rejects a new role namedAdmin(any case) with a 400; existing roles with that name keep working. In the UI, the flag reads "Admin (superuser)" wherever it is listed among roles.Cherry-picked from
27ea2c45ed5; applied cleanly, andgit patch-id --stableis identical to the original commit.Type of change:
Tests:
Unit tests
RolesCard,BotDetailPanel,UserRoles,PopoverContent,MembershipSection,PermissionsTab) come with the change and run in CI.Backend integration tests
RoleResourceIT#test_roleNamedAdminIsRejectedon2.1: passed (MySQL + Elasticsearch, isolated and parallel lanes).UI screen recording:
Not applicable: a bug fix that changes a label.
Checklist:
Fixes #<issue-number>above.REVIEW.md; no findings.

Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
Reserves the name
Adminfor new roles and labels the admin flag as “Admin (superuser)” across role displays and editors.No actionable issues found. Tests were not run during this review.
Reviews (1) · Last reviewed commit: "Fixes 37701: Reserve the Admin role name..." · Reviewed by Greptile