Skip to content
Snippets Groups Projects
Commit 5eb68cf9 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Remove limit to finding user by username using password

parent a35718f9
No related branches found
No related tags found
No related merge requests found
...@@ -152,12 +152,6 @@ public class UserBean { ...@@ -152,12 +152,6 @@ public class UserBean {
*/ */
public VipsLogicUser getUser(String username, Integer userAuthenticationTypeId) public VipsLogicUser getUser(String username, Integer userAuthenticationTypeId)
{ {
// If type of authentication is PASSWORD, we return nothing
if(userAuthenticationTypeId.equals(UserAuthenticationType.TYPE_PASSWORD))
{
return null;
}
// We find the authentication with given name // We find the authentication with given name
Query q = em.createNamedQuery("UserAuthentication.findByUsername"); Query q = em.createNamedQuery("UserAuthentication.findByUsername");
q.setParameter("username", username); q.setParameter("username", username);
...@@ -172,6 +166,11 @@ public class UserBean { ...@@ -172,6 +166,11 @@ public class UserBean {
} }
return null; return null;
} }
public UserAuthenticationType createUserAuthenticationTypeInstance(Integer userAuthenticationTypeId)
{
return em.find(UserAuthenticationType.class, userAuthenticationTypeId);
}
public VipsLogicUser storeUserFirstTime(VipsLogicUser user,UserAuthentication auth) throws FormValidationException public VipsLogicUser storeUserFirstTime(VipsLogicUser user,UserAuthentication auth) throws FormValidationException
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment