[DS-707] Style / readability improvements

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5565 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Graham Triggs
2010-10-22 23:19:13 +00:00
parent 56c6ca1f49
commit d032c565e0
79 changed files with 927 additions and 246 deletions

View File

@@ -225,19 +225,24 @@ public class LDAPHierarchicalAuthentication
{
// e-mail address corresponds to active account
if (eperson.getRequireCertificate())
return CERT_REQUIRED;
else if (!eperson.canLogIn())
return BAD_ARGS;
{
if (ldap.ldapAuthenticate(dn, password, context))
{
context.setCurrentUser(eperson);
log.info(LogManager
.getHeader(context, "authenticate", "type=ldap"));
return SUCCESS;
}
else
return BAD_CREDENTIALS;
return CERT_REQUIRED;
}
else if (!eperson.canLogIn())
{
return BAD_ARGS;
}
if (ldap.ldapAuthenticate(dn, password, context))
{
context.setCurrentUser(eperson);
log.info(LogManager
.getHeader(context, "authenticate", "type=ldap"));
return SUCCESS;
}
else
{
return BAD_CREDENTIALS;
}
}