KEYCLOAK-11582 Fix ldap groups sync which fails when syncing back to MSAD (#6348)

* KEYCLOAK-11582 Fix sync which fails when syncing to MSAD
This commit is contained in:
Felix Borchers 2019-10-03 20:13:12 +02:00 committed by Marek Posolda
parent bc5b4de79e
commit 3d175dbe0c

View file

@ -450,8 +450,8 @@ public class GroupLDAPStorageMapper extends AbstractLDAPStorageMapper implements
logger.debugf("Syncing groups from Keycloak into LDAP. Mapper is [%s], LDAP provider is [%s]", mapperModel.getName(), ldapProvider.getModel().getName());
// Query existing LDAP groups
try (LDAPQuery ldapQuery = createGroupQuery(config.isPreserveGroupsInheritance())) {
List<LDAPObject> ldapGroups = ldapQuery.getResultList();
List<LDAPObject> ldapGroups = getAllLDAPGroups(config.isPreserveGroupsInheritance());
// Convert them to Map<String, LDAPObject>
Map<String, LDAPObject> ldapGroupsMap = new HashMap<>();
@ -488,7 +488,6 @@ public class GroupLDAPStorageMapper extends AbstractLDAPStorageMapper implements
processKeycloakGroupMembershipsSyncToLDAP(kcGroup, ldapGroupsMap);
}
}
}
return syncResult;
}