Compare SSSD email ignoring the case

Closes https://github.com/keycloak/keycloak/issues/21394
This commit is contained in:
rmartinc 2023-07-03 09:44:53 +02:00 committed by Pedro Igor
parent 0e441b9fb8
commit f21c35c21f
2 changed files with 3 additions and 6 deletions

View file

@ -24,7 +24,7 @@ if [[ "true" == "$1" ]]; then
printf "%b" "password\n" | kinit admin
ipa group-add --desc='test group' testgroup
ipa user-add emily --first=Emily --last=Jones --email=emily@jones.com --random
ipa user-add emily --first=Emily --last=Jones --email=Emily@jones.com --random
ipa group-add-member testgroup --users=emily
ipa user-add bart --first=bart --last=bart --email= --random
ipa user-add david --first=david --last=david --random

View file

@ -113,12 +113,9 @@ public class Sssd {
return false;
}
if (email != null) {
return email.equals(userModel.getEmail());
return email.equalsIgnoreCase(userModel.getEmail());
}
if (email != userModel.getEmail()) {
return false;
}
return true;
return userModel.getEmail() == null;
}
@Override