|
12 | 12 | import org.apache.commons.collections4.CollectionUtils; |
13 | 13 | import org.apache.commons.lang3.ObjectUtils; |
14 | 14 | import org.apache.commons.lang3.StringUtils; |
| 15 | +import org.apache.commons.lang3.Strings; |
15 | 16 | import org.apache.commons.text.WordUtils; |
16 | 17 | import org.apache.cxf.jaxrs.impl.UriInfoImpl; |
17 | 18 | import org.apache.cxf.message.Message; |
@@ -550,7 +551,7 @@ private boolean hasAttributeChange(final SimpleUser importEntry, boolean hasChan |
550 | 551 | */ |
551 | 552 | @SafeVarargs |
552 | 553 | private boolean hasAttributeChange(final SimpleUser user1, final SimpleUser user2, final Function<SimpleUser, String>... equals) { |
553 | | - final var predicateFalse = Arrays.stream(equals).filter(f -> !StringUtils.equalsIgnoreCase(StringUtils.trimToNull(f.apply(user2)), StringUtils.trimToNull(f.apply(user1)))).findFirst().orElse(null); |
| 554 | + final var predicateFalse = Arrays.stream(equals).filter(f -> !Strings.CI.equals(StringUtils.trimToNull(f.apply(user2)), StringUtils.trimToNull(f.apply(user1)))).findFirst().orElse(null); |
554 | 555 | return predicateFalse != null && hasAttributeChange(user1, true, String.format("'%s' != '%s'", predicateFalse.apply(user1), predicateFalse.apply(user2))); |
555 | 556 | } |
556 | 557 |
|
@@ -989,7 +990,7 @@ public void decorate(final SessionSettings settings) { |
989 | 990 | public Collection<GrantedAuthority> getGrantedAuthorities(final String username) { |
990 | 991 | try { |
991 | 992 | // Check if the user lock status without using cache |
992 | | - final var rawUserOrg = getUserRepository().findById(Normalizer.normalize(username)); |
| 993 | + final var rawUserOrg = getUserRepository().toUser(Normalizer.normalize(username)); |
993 | 994 | final var roles = new ArrayList<GrantedAuthority>(); |
994 | 995 | for (String group : rawUserOrg.getGroups()) { |
995 | 996 | roles.add(new SimpleGrantedAuthority(group.toUpperCase())); |
|
0 commit comments