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
1 changed files with 5 additions and 1 deletions
|
@ -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…
Reference in a new issue