Stuart Lewis - [ 1947036 ] Patch for SF Bug1896960 SWORD authentication and LDAP + [ 1989874 ] LDAPAuthentication pluggable method broken for current users

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2959 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Stuart Lewis
2008-06-11 09:40:51 +00:00
parent 40984350a4
commit aa2df4c39b
2 changed files with 2 additions and 1 deletions

View File

@@ -172,6 +172,7 @@ public class LDAPAuthentication
{ {
if (ldap.ldapAuthenticate(netid, password, context)) if (ldap.ldapAuthenticate(netid, password, context))
{ {
context.setCurrentUser(eperson = EPerson.findByNetid(context, netid.toLowerCase()));
log.info(LogManager log.info(LogManager
.getHeader(context, "authenticate", "type=ldap")); .getHeader(context, "authenticate", "type=ldap"));
return SUCCESS; return SUCCESS;

View File

@@ -266,7 +266,7 @@ public class DSpaceSWORDServer implements SWORDServer
if (auth.authenticates(this.context, un, pw)) if (auth.authenticates(this.context, un, pw))
{ {
// if authenticated, obtain the eperson object // if authenticated, obtain the eperson object
ep = EPerson.findByEmail(context, un); ep = context.getCurrentUser();
if (ep != null) if (ep != null)
{ {