|
@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.security.authentication.AuthenticationServiceException;
|
|
import org.springframework.security.authentication.AuthenticationServiceException;
|
|
|
|
+import org.springframework.security.authentication.LockedException;
|
|
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
|
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
|
import org.springframework.security.core.Authentication;
|
|
import org.springframework.security.core.Authentication;
|
|
import org.springframework.security.core.AuthenticationException;
|
|
import org.springframework.security.core.AuthenticationException;
|
|
@@ -80,6 +81,15 @@ public class UsernameAuthenticationFilter extends AbstractAuthenticationProcessi
|
|
if (userInfo == null) {
|
|
if (userInfo == null) {
|
|
throw new UsernameNotFoundException("404.9");
|
|
throw new UsernameNotFoundException("404.9");
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if(!userInfo.getSysUser().getIsSuperAdmin()){
|
|
|
|
+ if(clientId.equalsIgnoreCase("system")){
|
|
|
|
+ Integer lockFlag = sysUserService.queryEmployeeLockFlag(userInfo.getSysUser().getId());
|
|
|
|
+ if(lockFlag == 1){
|
|
|
|
+ throw new LockedException("账户被锁定");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
if (!StringUtils.upperCase(userInfo.getSysUser().getUserType()).contains(StringUtils.upperCase(clientId))) {
|
|
if (!StringUtils.upperCase(userInfo.getSysUser().getUserType()).contains(StringUtils.upperCase(clientId))) {
|
|
throw new UsernameNotFoundException("用户不存在");
|
|
throw new UsernameNotFoundException("用户不存在");
|