mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-10 15:32:05 -03:30
Fix NPE on whoami with unknown Realm (#33912)
Closes #33907 Signed-off-by: Oliver Cremerius <antikalk@users.noreply.github.com>
This commit is contained in:
parent
b95d12a968
commit
936cf68050
@ -291,7 +291,11 @@ public class AdminConsole {
|
||||
|
||||
private void addMasterRealmAccess(UserModel user, String currentRealm, Map<String, Set<String>> realmAdminAccess) {
|
||||
final RealmModel realm = session.realms().getRealmByName(currentRealm);
|
||||
getRealmAdminAccess(realm, realm.getMasterAdminClient(), user, realmAdminAccess);
|
||||
if (realm != null) {
|
||||
getRealmAdminAccess(realm, realm.getMasterAdminClient(), user, realmAdminAccess);
|
||||
} else {
|
||||
throw new NotFoundException("Realm not found");
|
||||
}
|
||||
}
|
||||
|
||||
private void getRealmAdminAccess(RealmModel realm, ClientModel client, UserModel user, Map<String, Set<String>> realmAdminAccess) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user