Commit 23034ed3 by zhanghj

V1.1.0--被停用用户,不允许自动登录

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@20966 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 0276565c
......@@ -1068,29 +1068,31 @@ public class UserController extends BaseController {
sysUser.setMiniOpenId(miniOpenId);
SysUser user = sysUserService.getUserById(sysUser);
if (user != null) {
String publicOpenId = user.getPublicOpenId();
String username = user.getUsername();
String password = user.getPassword();
isMiniAuth = true;
String userStatus = user.getUserStatus();
String publicOpenId = user.getPublicOpenId();
String username = user.getUsername();
String password = user.getPassword();
if (com.glsx.common.constants.Constants.SYS_USER_STATUS_NORMAL.equals(userStatus)) {
isMiniAuth = true;
/*
* 同一用户单端登录
*/
singleTerminalTypeLogin(username);
/*
* shiro登录校验
*/
Subject subject = SecurityUtils.getSubject();
//UsernamePasswordToken token = new UsernamePasswordToken(username, password);
CustomToken token = new CustomToken(username, password, LoginType.NOPASSWD, false, null);
subject.login(token);
session.setAttribute(com.glsx.common.constants.Constants.SESSION_USERNAME_KEY, username);
session.setAttribute(com.glsx.common.constants.Constants.SESSION_USERID_KEY, user.getId());
jsessionid = (String) subject.getSession().getId();
}
if (!org.springframework.util.StringUtils.isEmpty(publicOpenId)) {
isPublicAuth = true;
}
/*
* 同一用户单端登录
*/
singleTerminalTypeLogin(username);
/*
* shiro登录校验
*/
Subject subject = SecurityUtils.getSubject();
//UsernamePasswordToken token = new UsernamePasswordToken(username, password);
CustomToken token = new CustomToken(username, password, LoginType.NOPASSWD, false, null);
subject.login(token);
session.setAttribute(com.glsx.common.constants.Constants.SESSION_USERNAME_KEY, username);
session.setAttribute(com.glsx.common.constants.Constants.SESSION_USERID_KEY, user.getId());
jsessionid = (String) subject.getSession().getId();
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!