Commit 2631d37b by 段启岩

加强用户登录时状态的判断

parent 0b0293b2
......@@ -65,11 +65,15 @@ public class AuthenticationServiceImpl implements IAuthenticationService {
}
//2. 判断账号状态
if (userAuthLocal.getStatus() == AuthStatus.DISABLED.getStatus()) {
if (null == userAuthLocal.getStatus()) {
throw new AuthenticationServiceException(AuthenticationErrorCode.USER_AUTH_DISABLED);
}
if (userAuthLocal.getStatus() == AuthStatus.WAIT_FOR_ACTIVE.getStatus()) {
if (AuthStatus.DISABLED.getStatus() == userAuthLocal.getStatus() ) {
throw new AuthenticationServiceException(AuthenticationErrorCode.USER_AUTH_DISABLED);
}
if (AuthStatus.WAIT_FOR_ACTIVE.getStatus() == userAuthLocal.getStatus()) {
throw new AuthenticationServiceException(AuthenticationErrorCode.ACCOUNT_NOT_ACTIVE);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment