Avoid multiple calls to LDAP when querying group memberships

Closes #44558

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
This commit is contained in:
Pedro Igor
2025-12-01 10:01:58 -03:00
committed by GitHub
parent a92221ba38
commit 3ec0dd24fe

View File

@@ -780,6 +780,8 @@ public class GroupLDAPStorageMapper extends AbstractLDAPStorageMapper implements
return cachedLDAPGroupMappings.stream();
}
cachedLDAPGroupMappings = Set.of();
List<LDAPObject> ldapGroups = getLDAPGroupMappings(ldapUser);
if (!ldapGroups.isEmpty()) {
GroupModel parent = getKcGroupsPathGroup(realm);