Skip to content

Commit

Permalink
fix: user attributes not updated #2753 (#3326)
Browse files Browse the repository at this point in the history
Co-authored-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>
  • Loading branch information
yuremm and yurem authored Dec 15, 2022
1 parent 723a36b commit c0a0f66
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 c0a0f66

Please sign in to comment.