format code
This commit is contained in:
parent
1e5c5675a7
commit
694e1be55e
|
@ -379,7 +379,7 @@ public class DefaultLdapRoleMapper
|
||||||
//failed to look up the user's groupEntry directly
|
//failed to look up the user's groupEntry directly
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
String posixGroup = "posixGroup";
|
String posixGroup = "posixGroup";
|
||||||
if (posixGroup.equals(getLdapGroupClass()))
|
if ( posixGroup.equals( getLdapGroupClass() ) )
|
||||||
{
|
{
|
||||||
builder.append( username );
|
builder.append( username );
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ import java.util.Date;
|
||||||
/**
|
/**
|
||||||
* @author <a href="jesse@codehaus.org"> jesse
|
* @author <a href="jesse@codehaus.org"> jesse
|
||||||
*/
|
*/
|
||||||
@Service("userMapper#ldap")
|
@Service( "userMapper#ldap" )
|
||||||
public class LdapUserMapper
|
public class LdapUserMapper
|
||||||
implements UserMapper
|
implements UserMapper
|
||||||
{
|
{
|
||||||
|
@ -60,7 +60,7 @@ public class LdapUserMapper
|
||||||
int maxResultCount = 0;
|
int maxResultCount = 0;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@Named(value = "userConfiguration#default")
|
@Named( value = "userConfiguration#default" )
|
||||||
private UserConfiguration userConf;
|
private UserConfiguration userConf;
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
|
@ -76,10 +76,12 @@ public class LdapUserMapper
|
||||||
userConf.getConcatenatedList( "ldap.config.base.dn", userBaseDn ) );
|
userConf.getConcatenatedList( "ldap.config.base.dn", userBaseDn ) );
|
||||||
userObjectClass =
|
userObjectClass =
|
||||||
userConf.getString( UserConfigurationKeys.LDAP_MAPPER_USER_ATTRIBUTE_OBJECT_CLASS, userObjectClass );
|
userConf.getString( UserConfigurationKeys.LDAP_MAPPER_USER_ATTRIBUTE_OBJECT_CLASS, userObjectClass );
|
||||||
userFilter = userConf.getConcatenatedList( UserConfigurationKeys.LDAP_MAPPER_USER_ATTRIBUTE_FILTER, userFilter );
|
userFilter =
|
||||||
|
userConf.getConcatenatedList( UserConfigurationKeys.LDAP_MAPPER_USER_ATTRIBUTE_FILTER, userFilter );
|
||||||
maxResultCount = userConf.getInt( UserConfigurationKeys.LDAP_MAX_RESULT_COUNT, maxResultCount );
|
maxResultCount = userConf.getInt( UserConfigurationKeys.LDAP_MAX_RESULT_COUNT, maxResultCount );
|
||||||
|
|
||||||
distinguishedNameAttribute = userConf.getString( UserConfigurationKeys.LDAP_DN_ATTRIBUTE, distinguishedNameAttribute );
|
distinguishedNameAttribute =
|
||||||
|
userConf.getString( UserConfigurationKeys.LDAP_DN_ATTRIBUTE, distinguishedNameAttribute );
|
||||||
}
|
}
|
||||||
|
|
||||||
public Attributes getCreationAttributes( User user, boolean encodePasswordIfChanged )
|
public Attributes getCreationAttributes( User user, boolean encodePasswordIfChanged )
|
||||||
|
@ -127,14 +129,15 @@ public class LdapUserMapper
|
||||||
return distinguishedNameAttribute;
|
return distinguishedNameAttribute;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDistinguishedNameAttribute(String distinguishedNameAttribute)
|
public void setDistinguishedNameAttribute( String distinguishedNameAttribute )
|
||||||
{
|
{
|
||||||
this.distinguishedNameAttribute = distinguishedNameAttribute;
|
this.distinguishedNameAttribute = distinguishedNameAttribute;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getUserAttributeNames()
|
public String[] getUserAttributeNames()
|
||||||
{
|
{
|
||||||
return new String[]{ emailAttribute, fullNameAttribute, passwordAttribute, userIdAttribute, distinguishedNameAttribute };
|
return new String[]{ emailAttribute, fullNameAttribute, passwordAttribute, userIdAttribute,
|
||||||
|
distinguishedNameAttribute };
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxResultCount()
|
public int getMaxResultCount()
|
||||||
|
@ -292,8 +295,8 @@ public class LdapUserMapper
|
||||||
|
|
||||||
public String[] getReturningAttributes()
|
public String[] getReturningAttributes()
|
||||||
{
|
{
|
||||||
return new String[]{ getUserIdAttribute(), getEmailAttribute(), getFullNameAttribute(),
|
return new String[]{ getUserIdAttribute(), getEmailAttribute(), getFullNameAttribute(), getPasswordAttribute(),
|
||||||
getPasswordAttribute(), getDistinguishedNameAttribute() };
|
getDistinguishedNameAttribute() };
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserConfiguration getUserConf()
|
public UserConfiguration getUserConf()
|
||||||
|
|
Loading…
Reference in New Issue