Commit 3d78e2c5 by Juho Juopperi

getDefaultUser in SessionHandlerBean

1 parent f51d8f3e
...@@ -38,7 +38,6 @@ public class SessionHandlerBean implements SessionHandlerBeanLocal { ...@@ -38,7 +38,6 @@ public class SessionHandlerBean implements SessionHandlerBeanLocal {
// TODO Auto-generated constructor stub // TODO Auto-generated constructor stub
} }
@Override @Override
public boolean hasPermission(String target, User user, RolePermission permission) { public boolean hasPermission(String target, User user, RolePermission permission) {
...@@ -97,14 +96,14 @@ public class SessionHandlerBean implements SessionHandlerBeanLocal { ...@@ -97,14 +96,14 @@ public class SessionHandlerBean implements SessionHandlerBeanLocal {
public User tryLogin(String username, String password) { public User tryLogin(String username, String password) {
User user = userfacade.findByLogin(username.trim()); User user = userfacade.findByLogin(username.trim());
if(user != null && user.checkPassword(password)) { if (user != null && user.checkPassword(password)) {
return user; return user;
} }
return null; return null;
} }
public User getDefaultUser() { public User getDefaultUser() {
throw new UnsupportedOperationException("Not supported yet."); return userfacade.getDefaultUser();
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!