mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
[DS-60] netid.toLowerCase() in different classes and methods - ID: 2458187
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3575 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -227,7 +227,7 @@ public class LDAPAuthentication
|
||||
log.info(LogManager.getHeader(context,
|
||||
"type=ldap-login", "type=ldap_but_already_email"));
|
||||
context.setIgnoreAuthorization(true);
|
||||
eperson.setNetid(netid);
|
||||
eperson.setNetid(netid.toLowerCase());
|
||||
eperson.update();
|
||||
context.commit();
|
||||
context.setIgnoreAuthorization(false);
|
||||
@@ -248,7 +248,7 @@ public class LDAPAuthentication
|
||||
if ((ldap.ldapGivenName!=null)&&(!ldap.ldapGivenName.equals(""))) eperson.setFirstName(ldap.ldapGivenName);
|
||||
if ((ldap.ldapSurname!=null)&&(!ldap.ldapSurname.equals(""))) eperson.setLastName(ldap.ldapSurname);
|
||||
if ((ldap.ldapPhone!=null)&&(!ldap.ldapPhone.equals(""))) eperson.setMetadata("phone", ldap.ldapPhone);
|
||||
eperson.setNetid(netid);
|
||||
eperson.setNetid(netid.toLowerCase());
|
||||
eperson.setCanLogIn(true);
|
||||
AuthenticationManager.initEPerson(context, request, eperson);
|
||||
eperson.update();
|
||||
|
@@ -262,7 +262,7 @@ public class LDAPHierarchicalAuthentication
|
||||
log.info(LogManager.getHeader(context,
|
||||
"type=ldap-login", "type=ldap_but_already_email"));
|
||||
context.setIgnoreAuthorization(true);
|
||||
eperson.setNetid(netid);
|
||||
eperson.setNetid(netid.toLowerCase());
|
||||
eperson.update();
|
||||
context.commit();
|
||||
context.setIgnoreAuthorization(false);
|
||||
@@ -298,7 +298,7 @@ public class LDAPHierarchicalAuthentication
|
||||
{
|
||||
eperson.setMetadata("phone", ldap.ldapPhone);
|
||||
}
|
||||
eperson.setNetid(netid);
|
||||
eperson.setNetid(netid.toLowerCase());
|
||||
eperson.setCanLogIn(true);
|
||||
AuthenticationManager.initEPerson(context, request, eperson);
|
||||
eperson.update();
|
||||
|
@@ -637,11 +637,6 @@ public class EPerson extends DSpaceObject
|
||||
*/
|
||||
public void setNetid(String s)
|
||||
{
|
||||
if (s != null)
|
||||
{
|
||||
s = s.toLowerCase();
|
||||
}
|
||||
|
||||
myRow.setColumn("netid", s);
|
||||
modified = true;
|
||||
}
|
||||
|
@@ -251,7 +251,7 @@ public class RegisterServlet extends DSpaceServlet
|
||||
String password = request.getParameter("password");
|
||||
EPerson eperson = EPerson.findByEmail(context, email);
|
||||
EPerson eperson2 = null;
|
||||
if (netid!=null) eperson2 = EPerson.findByNetid(context, netid);
|
||||
if (netid!=null) eperson2 = EPerson.findByNetid(context, netid.toLowerCase());
|
||||
|
||||
try
|
||||
{
|
||||
@@ -474,7 +474,7 @@ public class RegisterServlet extends DSpaceServlet
|
||||
EPerson eperson = null;
|
||||
if (email!=null) eperson = EPerson.findByEmail(context, email);
|
||||
EPerson eperson2 = null;
|
||||
eperson2 = EPerson.findByNetid(context, netid);
|
||||
eperson2 = EPerson.findByNetid(context, netid.toLowerCase());
|
||||
if (eperson2 !=null) eperson = eperson2;
|
||||
|
||||
if (eperson == null)
|
||||
@@ -485,7 +485,7 @@ public class RegisterServlet extends DSpaceServlet
|
||||
context.setIgnoreAuthorization(true);
|
||||
eperson = EPerson.create(context);
|
||||
eperson.setEmail(email);
|
||||
eperson.setNetid(netid);
|
||||
eperson.setNetid(netid.toLowerCase());
|
||||
eperson.update();
|
||||
context.setIgnoreAuthorization(false);
|
||||
}
|
||||
|
@@ -154,7 +154,7 @@ public class EPersonAdminServlet extends DSpaceServlet
|
||||
|
||||
if (netid != null)
|
||||
{
|
||||
e.setNetid(netid.equals("") ? null : netid);
|
||||
e.setNetid(netid.equals("") ? null : netid.toLowerCase());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -199,7 +199,7 @@ public class EPersonAdminServlet extends DSpaceServlet
|
||||
// no change to email
|
||||
if (netid != null)
|
||||
{
|
||||
e.setNetid(netid.equals("") ? null : netid);
|
||||
e.setNetid(netid.equals("") ? null : netid.toLowerCase());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -19,6 +19,7 @@
|
||||
- [2513300] Fix for bug [1774958] Nested folders do not export correctly
|
||||
- Fix for SF bug [2086481] xmlui Administrative log in as another eperson
|
||||
- Fix for SF bug [2155479] Submission verify page handles dc.identifier.* incorrectly
|
||||
- [DS-60] netid.toLowerCase() in different classes and methods - ID: 2458187
|
||||
|
||||
(Stuart Lewis / Chris Yates / Flavio Botelho / Alex Barbieri / Reuben Pasquini / Paulo Matos)
|
||||
- [2057378] Hierarchical LDAP support
|
||||
|
Reference in New Issue
Block a user