Skip to content

Commit c0a0f66

Browse files
yuremmyurem
andauthored
fix: user attributes not updated #2753 (#3326)
Co-authored-by: Yuriy Movchan <[email protected]>
1 parent 723a36b commit c0a0f66

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

jans-auth-server/server/src/main/java/io/jans/as/server/service/ClientService.java

+15
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,24 @@ public class ClientService {
7474
private StaticConfiguration staticConfiguration;
7575

7676
public void persist(Client client) {
77+
ignoreCustomObjectClassesForNonLDAP(client);
7778
ldapEntryManager.persist(client);
7879
}
7980

81+
82+
private Client ignoreCustomObjectClassesForNonLDAP(Client client) {
83+
String persistenceType = ldapEntryManager.getPersistenceType();
84+
log.debug("persistenceType: {}", persistenceType);
85+
if (!PersistenceEntryManager.PERSITENCE_TYPES.ldap.name().equals(persistenceType)) {
86+
log.debug(
87+
"Setting CustomObjectClasses :{} to null as it's used only for LDAP and current persistenceType is {} ",
88+
client.getCustomObjectClasses(), persistenceType);
89+
client.setCustomObjectClasses(null);
90+
}
91+
92+
return client;
93+
}
94+
8095
public void merge(Client client) {
8196
ldapEntryManager.merge(client);
8297
removeFromCache(client);

0 commit comments

Comments
 (0)