|
|
|
@@ -53,6 +53,10 @@ public class MyShiroRealm extends AuthorizingRealm { |
|
|
|
if(user == null) { |
|
|
|
throw new UnknownAccountException(ErrorCode.USER_IS_EMPTY.getMessage()); |
|
|
|
} |
|
|
|
if(user.getTenantId().equals("1")) { |
|
|
|
// 只支持租户为1的用户 |
|
|
|
throw new UnknownAccountException("租户不支持"); |
|
|
|
} |
|
|
|
if(user.getStatus()==null || |
|
|
|
!EnumMallUserStatus.VALID.getCode().equals(user.getStatus())) {//用户被禁用 |
|
|
|
throw new DisabledAccountException(ErrorCode.USER_IS_LOCKED.getMessage()); |
|
|
|
|