gravitee-access-management
gravitee-access-management copied to clipboard
fix: do not override the preferredLangague field by the locale claim
fixes gravitee-io/issues#8268
How to test
You can use the acceptance tests explain here https://github.com/gravitee-io/issues/issues/8039 The case where the locale claims is updated should works
Not a huge fan to have a parameter in the getter method.
Seems to only affected the SCIM part of AM, maybe do a change like this in the mapper :
scimUser.setPreferredLanguage(get(additionalInformation, StandardClaims.LOCALE) == null ? user.getPreferredLanguage() : (!get(additionalInformation, StandardClaims.LOCALE).equals(user.getPreferredLanguage()) ? user.getPreferredLanguage() : get(additionalInformation, StandardClaims.LOCALE)));
It is not only about SCIM but also about UserProperties provided to the template engines.
IMHO we shouldn't persist/override the preferredLanguage
using the standard locale claims (even in SCIM)
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication