mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-14 21:43:11 +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,
|
log.info(LogManager.getHeader(context,
|
||||||
"type=ldap-login", "type=ldap_but_already_email"));
|
"type=ldap-login", "type=ldap_but_already_email"));
|
||||||
context.setIgnoreAuthorization(true);
|
context.setIgnoreAuthorization(true);
|
||||||
eperson.setNetid(netid);
|
eperson.setNetid(netid.toLowerCase());
|
||||||
eperson.update();
|
eperson.update();
|
||||||
context.commit();
|
context.commit();
|
||||||
context.setIgnoreAuthorization(false);
|
context.setIgnoreAuthorization(false);
|
||||||
@@ -248,7 +248,7 @@ public class LDAPAuthentication
|
|||||||
if ((ldap.ldapGivenName!=null)&&(!ldap.ldapGivenName.equals(""))) eperson.setFirstName(ldap.ldapGivenName);
|
if ((ldap.ldapGivenName!=null)&&(!ldap.ldapGivenName.equals(""))) eperson.setFirstName(ldap.ldapGivenName);
|
||||||
if ((ldap.ldapSurname!=null)&&(!ldap.ldapSurname.equals(""))) eperson.setLastName(ldap.ldapSurname);
|
if ((ldap.ldapSurname!=null)&&(!ldap.ldapSurname.equals(""))) eperson.setLastName(ldap.ldapSurname);
|
||||||
if ((ldap.ldapPhone!=null)&&(!ldap.ldapPhone.equals(""))) eperson.setMetadata("phone", ldap.ldapPhone);
|
if ((ldap.ldapPhone!=null)&&(!ldap.ldapPhone.equals(""))) eperson.setMetadata("phone", ldap.ldapPhone);
|
||||||
eperson.setNetid(netid);
|
eperson.setNetid(netid.toLowerCase());
|
||||||
eperson.setCanLogIn(true);
|
eperson.setCanLogIn(true);
|
||||||
AuthenticationManager.initEPerson(context, request, eperson);
|
AuthenticationManager.initEPerson(context, request, eperson);
|
||||||
eperson.update();
|
eperson.update();
|
||||||
|
@@ -262,7 +262,7 @@ public class LDAPHierarchicalAuthentication
|
|||||||
log.info(LogManager.getHeader(context,
|
log.info(LogManager.getHeader(context,
|
||||||
"type=ldap-login", "type=ldap_but_already_email"));
|
"type=ldap-login", "type=ldap_but_already_email"));
|
||||||
context.setIgnoreAuthorization(true);
|
context.setIgnoreAuthorization(true);
|
||||||
eperson.setNetid(netid);
|
eperson.setNetid(netid.toLowerCase());
|
||||||
eperson.update();
|
eperson.update();
|
||||||
context.commit();
|
context.commit();
|
||||||
context.setIgnoreAuthorization(false);
|
context.setIgnoreAuthorization(false);
|
||||||
@@ -298,7 +298,7 @@ public class LDAPHierarchicalAuthentication
|
|||||||
{
|
{
|
||||||
eperson.setMetadata("phone", ldap.ldapPhone);
|
eperson.setMetadata("phone", ldap.ldapPhone);
|
||||||
}
|
}
|
||||||
eperson.setNetid(netid);
|
eperson.setNetid(netid.toLowerCase());
|
||||||
eperson.setCanLogIn(true);
|
eperson.setCanLogIn(true);
|
||||||
AuthenticationManager.initEPerson(context, request, eperson);
|
AuthenticationManager.initEPerson(context, request, eperson);
|
||||||
eperson.update();
|
eperson.update();
|
||||||
|
@@ -637,11 +637,6 @@ public class EPerson extends DSpaceObject
|
|||||||
*/
|
*/
|
||||||
public void setNetid(String s)
|
public void setNetid(String s)
|
||||||
{
|
{
|
||||||
if (s != null)
|
|
||||||
{
|
|
||||||
s = s.toLowerCase();
|
|
||||||
}
|
|
||||||
|
|
||||||
myRow.setColumn("netid", s);
|
myRow.setColumn("netid", s);
|
||||||
modified = true;
|
modified = true;
|
||||||
}
|
}
|
||||||
|
@@ -251,7 +251,7 @@ public class RegisterServlet extends DSpaceServlet
|
|||||||
String password = request.getParameter("password");
|
String password = request.getParameter("password");
|
||||||
EPerson eperson = EPerson.findByEmail(context, email);
|
EPerson eperson = EPerson.findByEmail(context, email);
|
||||||
EPerson eperson2 = null;
|
EPerson eperson2 = null;
|
||||||
if (netid!=null) eperson2 = EPerson.findByNetid(context, netid);
|
if (netid!=null) eperson2 = EPerson.findByNetid(context, netid.toLowerCase());
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -474,7 +474,7 @@ public class RegisterServlet extends DSpaceServlet
|
|||||||
EPerson eperson = null;
|
EPerson eperson = null;
|
||||||
if (email!=null) eperson = EPerson.findByEmail(context, email);
|
if (email!=null) eperson = EPerson.findByEmail(context, email);
|
||||||
EPerson eperson2 = null;
|
EPerson eperson2 = null;
|
||||||
eperson2 = EPerson.findByNetid(context, netid);
|
eperson2 = EPerson.findByNetid(context, netid.toLowerCase());
|
||||||
if (eperson2 !=null) eperson = eperson2;
|
if (eperson2 !=null) eperson = eperson2;
|
||||||
|
|
||||||
if (eperson == null)
|
if (eperson == null)
|
||||||
@@ -485,7 +485,7 @@ public class RegisterServlet extends DSpaceServlet
|
|||||||
context.setIgnoreAuthorization(true);
|
context.setIgnoreAuthorization(true);
|
||||||
eperson = EPerson.create(context);
|
eperson = EPerson.create(context);
|
||||||
eperson.setEmail(email);
|
eperson.setEmail(email);
|
||||||
eperson.setNetid(netid);
|
eperson.setNetid(netid.toLowerCase());
|
||||||
eperson.update();
|
eperson.update();
|
||||||
context.setIgnoreAuthorization(false);
|
context.setIgnoreAuthorization(false);
|
||||||
}
|
}
|
||||||
|
@@ -154,7 +154,7 @@ public class EPersonAdminServlet extends DSpaceServlet
|
|||||||
|
|
||||||
if (netid != null)
|
if (netid != null)
|
||||||
{
|
{
|
||||||
e.setNetid(netid.equals("") ? null : netid);
|
e.setNetid(netid.equals("") ? null : netid.toLowerCase());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -199,7 +199,7 @@ public class EPersonAdminServlet extends DSpaceServlet
|
|||||||
// no change to email
|
// no change to email
|
||||||
if (netid != null)
|
if (netid != null)
|
||||||
{
|
{
|
||||||
e.setNetid(netid.equals("") ? null : netid);
|
e.setNetid(netid.equals("") ? null : netid.toLowerCase());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
- [2513300] Fix for bug [1774958] Nested folders do not export correctly
|
- [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 [2086481] xmlui Administrative log in as another eperson
|
||||||
- Fix for SF bug [2155479] Submission verify page handles dc.identifier.* incorrectly
|
- 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)
|
(Stuart Lewis / Chris Yates / Flavio Botelho / Alex Barbieri / Reuben Pasquini / Paulo Matos)
|
||||||
- [2057378] Hierarchical LDAP support
|
- [2057378] Hierarchical LDAP support
|
||||||
|
Reference in New Issue
Block a user