Skip to content

[Backport 26.7] fix(admin/api): allow non-master realm roles named admin or create-realm - #51426

Merged
ahus1 merged 1 commit into
keycloak:release/26.7from
pedroigor:issue-51323-bp-26.7
Aug 6, 2026
Merged

[Backport 26.7] fix(admin/api): allow non-master realm roles named admin or create-realm#51426
ahus1 merged 1 commit into
keycloak:release/26.7from
pedroigor:issue-51323-bp-26.7

Conversation

@pedroigor

Copy link
Copy Markdown
Contributor

Updated RolePermissions.isRealmAdminRole() to explicitly check that the role belongs to the master realm before blocking it. This ensures that application realms can use and manage custom roles named admin or create-realm without being flagged as protected roles.

Closes #51323

@pedroigor
pedroigor requested a review from a team as a code owner August 4, 2026 14:25
Updated RolePermissions.isRealmAdminRole() to explicitly check that the role belongs to the master realm before blocking it. This ensures that application realms can use and manage custom roles named admin or create-realm without being flagged as protected roles.

Closes keycloak#51323

Signed-off-by: alehhu <159355663+alehhu@users.noreply.github.com>
@pedroigor
pedroigor force-pushed the issue-51323-bp-26.7 branch from 0ae268f to acdd48c Compare August 4, 2026 18:19
@ahus1
ahus1 enabled auto-merge (squash) August 6, 2026 08:46
@ahus1
ahus1 merged commit a77fe89 into keycloak:release/26.7 Aug 6, 2026
92 of 94 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants