mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2 to HEAD
15240: Small correction to ETHREEOH-2508 fix. Handle 'empty name' case reported in user forums. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15241 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -546,7 +546,7 @@ public class LDAPUserRegistry implements UserRegistry, InitializingBean, Activat
|
|||||||
for (int i = 0; i < memAttribute.size(); i++)
|
for (int i = 0; i < memAttribute.size(); i++)
|
||||||
{
|
{
|
||||||
String attribute = (String) memAttribute.get(i);
|
String attribute = (String) memAttribute.get(i);
|
||||||
if (attribute != null)
|
if (attribute != null && attribute.length() > 0)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -555,14 +555,14 @@ public class LDAPUserRegistry implements UserRegistry, InitializingBean, Activat
|
|||||||
LdapName distinguishedName = new LdapName(attribute);
|
LdapName distinguishedName = new LdapName(attribute);
|
||||||
Attribute nameAttribute;
|
Attribute nameAttribute;
|
||||||
|
|
||||||
// If the user and group search bases are different we may be able to recognise user
|
// If the user and group search bases are different we may be able to recognize user
|
||||||
// and group DNs without a secondary lookup
|
// and group DNs without a secondary lookup
|
||||||
if (disjoint)
|
if (disjoint)
|
||||||
{
|
{
|
||||||
Attributes nameAttributes = distinguishedName.getRdn(
|
Attributes nameAttributes = distinguishedName.getRdn(
|
||||||
distinguishedName.size() - 1).toAttributes();
|
distinguishedName.size() - 1).toAttributes();
|
||||||
|
|
||||||
// Recognise user DNs
|
// Recognize user DNs
|
||||||
if (distinguishedName.startsWith(userDistinguishedNamePrefix)
|
if (distinguishedName.startsWith(userDistinguishedNamePrefix)
|
||||||
&& (nameAttribute = nameAttributes.get(this.userIdAttributeName)) != null)
|
&& (nameAttribute = nameAttributes.get(this.userIdAttributeName)) != null)
|
||||||
{
|
{
|
||||||
@@ -570,7 +570,7 @@ public class LDAPUserRegistry implements UserRegistry, InitializingBean, Activat
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recognise group DNs
|
// Recognize group DNs
|
||||||
if (distinguishedName.startsWith(groupDistinguishedNamePrefix)
|
if (distinguishedName.startsWith(groupDistinguishedNamePrefix)
|
||||||
&& (nameAttribute = nameAttributes.get(this.groupIdAttributeName)) != null)
|
&& (nameAttribute = nameAttributes.get(this.groupIdAttributeName)) != null)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user