mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-01-31 17:40:05 +08:00
!10 修复 匿名用户会被鉴定为anonymousUser
Merge pull request !10 from niu_dehua/fix_login
This commit is contained in:
commit
4f5ebb797a
@ -56,7 +56,7 @@ public class SecurityFrameworkUtils {
|
|||||||
if (authentication == null) {
|
if (authentication == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return (LoginUser) authentication.getPrincipal();
|
return authentication.getPrincipal() instanceof LoginUser ? (LoginUser) authentication.getPrincipal() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user