Skip to content

Commit

Permalink
fix: user attributes not updated #2753
Browse files Browse the repository at this point in the history
  • Loading branch information
yurem committed Dec 15, 2022
1 parent 723a36b commit cbbda47
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,24 @@ public class ClientService {
private StaticConfiguration staticConfiguration;

public void persist(Client client) {
ignoreCustomObjectClassesForNonLDAP(client);
ldapEntryManager.persist(client);
}


private Client ignoreCustomObjectClassesForNonLDAP(Client client) {
String persistenceType = ldapEntryManager.getPersistenceType();
log.debug("persistenceType: {}", persistenceType);
if (!PersistenceEntryManager.PERSITENCE_TYPES.ldap.name().equals(persistenceType)) {
log.debug(
"Setting CustomObjectClasses :{} to null as it's used only for LDAP and current persistenceType is {} ",
client.getCustomObjectClasses(), persistenceType);
client.setCustomObjectClasses(null);
}

return client;
}

public void merge(Client client) {
ldapEntryManager.merge(client);
removeFromCache(client);
Expand Down

0 comments on commit cbbda47

Please sign in to comment.