(Stuart Lewis) Fix for SF bug #2055941 LDAP authentication fails for new users in SWORD and Manakin

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3051 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Stuart Lewis
2008-08-17 14:11:20 +00:00
parent 8b192d2665
commit 160adab1c9

View File

@@ -62,14 +62,10 @@ import org.dspace.core.LogManager;
import org.dspace.eperson.EPerson; import org.dspace.eperson.EPerson;
/** /**
* This is UNTESTED, since I do not have LDAP servers available. * Authentication module to authenticate against a flat LDAP tree where
* It was adpated from LDAPServlet and should replace it. * all users are in the same unit.
* See the <code>AuthenticationMethod</code> interface for more details.
* *
* As of August 2005 we need a volunteer to complete and test this * @author Larry Stone, Stuart Lewis
* implementation. They should add themselves to the author tag below.
*
* @author Larry Stone
* @version $Revision$ * @version $Revision$
*/ */
public class LDAPAuthentication public class LDAPAuthentication
@@ -228,7 +224,8 @@ public class LDAPAuthentication
AuthenticationManager.initEPerson(context, request, eperson); AuthenticationManager.initEPerson(context, request, eperson);
eperson.update(); eperson.update();
context.commit(); context.commit();
} context.setCurrentUser(eperson);
}
catch (AuthorizeException e) catch (AuthorizeException e)
{ {
return NO_SUCH_USER; return NO_SUCH_USER;