#73 restore authentication
This commit is contained in:
parent
9bd954ea9b
commit
993a034527
@ -23,9 +23,6 @@ public class UserUtils {
|
|||||||
}
|
}
|
||||||
final Authentication authentication = securityContext.getAuthentication();
|
final Authentication authentication = securityContext.getAuthentication();
|
||||||
|
|
||||||
if (authentication == null) {
|
|
||||||
return "admin";
|
|
||||||
}
|
|
||||||
if (authentication.getPrincipal() instanceof UserDetails) {
|
if (authentication.getPrincipal() instanceof UserDetails) {
|
||||||
final UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal();
|
final UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal();
|
||||||
return springSecurityUser.getUsername();
|
return springSecurityUser.getUsername();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user