|
|
|
@ -19,7 +19,7 @@ import info.bukova.isspst.Constants;
|
|
|
|
|
import info.bukova.isspst.data.Role;
|
|
|
|
|
import info.bukova.isspst.data.User;
|
|
|
|
|
import info.bukova.isspst.services.AbstractService;
|
|
|
|
|
import info.bukova.isspst.services.LazyLoader;
|
|
|
|
|
//import info.bukova.isspst.services.LazyLoader;
|
|
|
|
|
|
|
|
|
|
public class UserServiceImpl extends AbstractService<User> implements UserService {
|
|
|
|
|
|
|
|
|
@ -104,6 +104,7 @@ public class UserServiceImpl extends AbstractService<User> implements UserServic
|
|
|
|
|
tmpRole.setAuthority(Constants.ROLE_ADMIN);
|
|
|
|
|
tmpAdmin.setUsername(Constants.DEF_ADMIN);
|
|
|
|
|
tmpAdmin.addAuthority(tmpRole);
|
|
|
|
|
tmpAdmin.setLastName("fakeLogin");
|
|
|
|
|
SecurityContextHolder.getContext().setAuthentication(new UsernamePasswordAuthenticationToken(tmpAdmin, null, tmpAdmin.getAuthorities()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -136,7 +137,7 @@ public class UserServiceImpl extends AbstractService<User> implements UserServic
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional
|
|
|
|
|
@LazyLoader({"grid", "form"})
|
|
|
|
|
// @LazyLoader({"grid", "form"})
|
|
|
|
|
public void loadAuthorities(User user) {
|
|
|
|
|
try {
|
|
|
|
|
if (user.getAuthorities() == null) {
|
|
|
|
|