mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-15 15:02:20 +00:00
Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)
128140 cpopa: MNT-14026: LDAP sync fails to update attribute's value deletion - Update to null, the node properties for which the corresponding LDAP attribute is missing. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@128144 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1150,7 +1150,9 @@ public class LDAPUserRegistry implements UserRegistry, LDAPNameResolver, Initial
|
||||
String attributeName = attributeMapping.get(key);
|
||||
if (attributeName != null)
|
||||
{
|
||||
Attribute attribute = ldapAttributes.get(attributeName);
|
||||
Attribute attribute = ldapAttributes.get(attributeName);
|
||||
String defaultAttribute = attributeDefaults.get(key);
|
||||
|
||||
if (attribute != null)
|
||||
{
|
||||
String value = (String) attribute.get(0);
|
||||
@@ -1159,13 +1161,14 @@ public class LDAPUserRegistry implements UserRegistry, LDAPNameResolver, Initial
|
||||
properties.put(keyQName, value);
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (defaultAttribute != null)
|
||||
{
|
||||
String defaultValue = attributeDefaults.get(key);
|
||||
if (defaultValue != null)
|
||||
{
|
||||
properties.put(keyQName, defaultValue);
|
||||
}
|
||||
properties.put(keyQName, defaultAttribute);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make sure that a 2nd sync, updates deleted ldap attributes(MNT-14026)
|
||||
properties.put(keyQName, null);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user