Commit a532d24f by Jani Huhtala

muutama init bugi

1 parent 8bf96c06
......@@ -124,7 +124,9 @@ public class UserBean implements UserBeanLocal {
if (defaultUser == null) {
defaultUser = new User();
defaultUser.setLogin(DEFAULT_USER_LOGIN);
defaultUser.setNick(DEFAULT_USER_LOGIN);
userFacade.create(defaultUser);
defaultUser.setSuperadmin(true);
}
return defaultUser;
......
......@@ -47,7 +47,9 @@ public class RoleFacade extends EventChildGenericFacade<Role> {
public Collection<Role> findAllParentsExcluding(Collection<Role> roles, Collection<Role> excludedResults) {
Set<Role> ret = new HashSet<Role>();
for (Role r : roles) {
ret.addAll(r.getParents());
if (r != null) {
ret.addAll(r.getParents());
}
}
ret.removeAll(excludedResults);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!