#73 restore authentication

This commit is contained in:
Anton Romanov 2019-03-20 20:32:10 +04:00
parent 9bd954ea9b
commit 993a034527

View File

@ -23,9 +23,6 @@ public class UserUtils {
}
final Authentication authentication = securityContext.getAuthentication();
if (authentication == null) {
return "admin";
}
if (authentication.getPrincipal() instanceof UserDetails) {
final UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal();
return springSecurityUser.getUsername();