KEYCLOAK-17678 Fix getting client scope by name resulting in listing clients
This commit is contained in:
parent
5a9068e732
commit
a09142c43a
1 changed files with 1 additions and 4 deletions
|
@ -714,10 +714,7 @@ public final class KeycloakModelUtils {
|
||||||
.filter(clientScope -> Objects.equals(clientScopeName, clientScope.getName()))
|
.filter(clientScope -> Objects.equals(clientScopeName, clientScope.getName()))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
// check if we are referencing a client instead of a scope
|
// check if we are referencing a client instead of a scope
|
||||||
.orElse(realm.getClientsStream()
|
.orElseGet(() -> realm.getClientByClientId(clientScopeName));
|
||||||
.filter(c -> Objects.equals(clientScopeName, c.getClientId()))
|
|
||||||
.findFirst()
|
|
||||||
.orElse(null));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue