mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-3604: Correct case-sensitivity issues in LDAP sync
- User names are now brought in line with the case of the LDAP directory during sync (in case the UID attribute is case sensitive) - User names are now compared according to Alfresco's case sensitivity setting - Group name comparisions are still case sensitive - Added unit test to ensure correct behaviour git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20873 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -616,7 +616,15 @@ public class PersonServiceImpl extends TransactionListenerAdapter implements Per
|
||||
makeHomeFolderIfRequired(personNode);
|
||||
}
|
||||
String realUserName = DefaultTypeConverter.INSTANCE.convert(String.class, nodeService.getProperty(personNode, ContentModel.PROP_USERNAME));
|
||||
properties.put(ContentModel.PROP_USERNAME, realUserName);
|
||||
String suggestedUserName;
|
||||
|
||||
// LDAP sync: allow change of case if we have case insensitive user names and the same name in a different case
|
||||
if (getUserNamesAreCaseSensitive()
|
||||
|| (suggestedUserName = (String) properties.get(ContentModel.PROP_USERNAME)) == null
|
||||
|| !suggestedUserName.equalsIgnoreCase(realUserName))
|
||||
{
|
||||
properties.put(ContentModel.PROP_USERNAME, realUserName);
|
||||
}
|
||||
}
|
||||
Map<QName, Serializable> update = nodeService.getProperties(personNode);
|
||||
update.putAll(properties);
|
||||
|
Reference in New Issue
Block a user