Prevent service account lookup when feature is disabled on client (#9579)
Closes #9563
This commit is contained in:
parent
5248815091
commit
8d3a4803bb
1 changed files with 2 additions and 2 deletions
|
@ -150,7 +150,7 @@ public class KeycloakIdentity implements Identity {
|
|||
ClientModel clientModel = getTargetClient();
|
||||
UserModel clientUser = null;
|
||||
|
||||
if (clientModel != null) {
|
||||
if (clientModel != null && clientModel.isServiceAccountsEnabled()) {
|
||||
clientUser = this.keycloakSession.users().getServiceAccount(clientModel);
|
||||
}
|
||||
|
||||
|
@ -225,7 +225,7 @@ public class KeycloakIdentity implements Identity {
|
|||
ClientModel clientModel = getTargetClient();
|
||||
UserModel clientUser = null;
|
||||
|
||||
if (clientModel != null) {
|
||||
if (clientModel != null && clientModel.isServiceAccountsEnabled()) {
|
||||
clientUser = this.keycloakSession.users().getServiceAccount(clientModel);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue