forked from github/dataease
perf(登录): 用户状态为失效情况下扫码登录错误提示
This commit is contained in:
parent
c0b4714640
commit
c227a1b49f
@ -9,6 +9,8 @@ import io.dataease.commons.exception.DEException;
|
||||
import io.dataease.commons.utils.DeLogUtils;
|
||||
import io.dataease.commons.utils.LogUtil;
|
||||
import io.dataease.commons.utils.ServletUtils;
|
||||
import io.dataease.exception.DataEaseException;
|
||||
import io.dataease.i18n.Translator;
|
||||
import io.dataease.plugins.common.base.domain.SysUserAssist;
|
||||
import io.dataease.plugins.config.SpringContextUtil;
|
||||
import io.dataease.plugins.xpack.dingtalk.dto.response.DingQrResult;
|
||||
@ -101,6 +103,8 @@ public class XDingtalkServer {
|
||||
sysUserService.validateExistUser(username, dingUserEntity.getName(), email);
|
||||
sysUserService.saveDingtalkCUser(dingUserEntity, email);
|
||||
sysUserEntity = authUserService.getUserByDingtalkId(username);
|
||||
} else if (sysUserEntity.getEnabled() == 0) {
|
||||
DataEaseException.throwException(Translator.get("i18n_user_is_disable"));
|
||||
}
|
||||
TokenInfo tokenInfo = TokenInfo.builder().userId(sysUserEntity.getUserId()).username(sysUserEntity.getUsername()).build();
|
||||
String realPwd = sysUserEntity.getPassword();
|
||||
|
@ -9,6 +9,8 @@ import io.dataease.commons.exception.DEException;
|
||||
import io.dataease.commons.utils.DeLogUtils;
|
||||
import io.dataease.commons.utils.LogUtil;
|
||||
import io.dataease.commons.utils.ServletUtils;
|
||||
import io.dataease.exception.DataEaseException;
|
||||
import io.dataease.i18n.Translator;
|
||||
import io.dataease.plugins.common.base.domain.SysUserAssist;
|
||||
import io.dataease.plugins.config.SpringContextUtil;
|
||||
|
||||
@ -102,6 +104,8 @@ public class XLarkServer {
|
||||
sysUserService.validateExistUser(username, larkUserInfo.getName(), email);
|
||||
sysUserService.saveLarkCUser(larkUserInfo, email);
|
||||
sysUserEntity = authUserService.getUserByLarkId(username);
|
||||
} else if (sysUserEntity.getEnabled() == 0) {
|
||||
DataEaseException.throwException(Translator.get("i18n_user_is_disable"));
|
||||
}
|
||||
TokenInfo tokenInfo = TokenInfo.builder().userId(sysUserEntity.getUserId()).username(sysUserEntity.getUsername()).build();
|
||||
String realPwd = sysUserEntity.getPassword();
|
||||
|
@ -9,6 +9,8 @@ import io.dataease.commons.exception.DEException;
|
||||
import io.dataease.commons.utils.DeLogUtils;
|
||||
import io.dataease.commons.utils.LogUtil;
|
||||
import io.dataease.commons.utils.ServletUtils;
|
||||
import io.dataease.exception.DataEaseException;
|
||||
import io.dataease.i18n.Translator;
|
||||
import io.dataease.plugins.common.base.domain.SysUserAssist;
|
||||
import io.dataease.plugins.config.SpringContextUtil;
|
||||
import io.dataease.plugins.xpack.display.dto.response.SysSettingDto;
|
||||
@ -102,6 +104,8 @@ public class XLarksuiteServer {
|
||||
sysUserService.validateExistUser(username, larkUserInfo.getName(), email);
|
||||
sysUserService.saveLarksuiteCUser(larkUserInfo, email);
|
||||
sysUserEntity = authUserService.getUserByLarksuiteId(username);
|
||||
} else if (sysUserEntity.getEnabled() == 0) {
|
||||
DataEaseException.throwException(Translator.get("i18n_user_is_disable"));
|
||||
}
|
||||
TokenInfo tokenInfo = TokenInfo.builder().userId(sysUserEntity.getUserId()).username(sysUserEntity.getUsername()).build();
|
||||
String realPwd = sysUserEntity.getPassword();
|
||||
|
@ -10,6 +10,8 @@ import io.dataease.commons.exception.DEException;
|
||||
import io.dataease.commons.utils.DeLogUtils;
|
||||
import io.dataease.commons.utils.LogUtil;
|
||||
import io.dataease.commons.utils.ServletUtils;
|
||||
import io.dataease.exception.DataEaseException;
|
||||
import io.dataease.i18n.Translator;
|
||||
import io.dataease.plugins.common.base.domain.SysUserAssist;
|
||||
import io.dataease.plugins.config.SpringContextUtil;
|
||||
import io.dataease.plugins.xpack.display.dto.response.SysSettingDto;
|
||||
@ -106,6 +108,8 @@ public class XWecomServer {
|
||||
sysUserService.validateExistUser(userId, userMap.get("name").toString(), email);
|
||||
sysUserService.saveWecomCUser(userMap, userId, email);
|
||||
sysUserEntity = authUserService.getUserByWecomId(userId);
|
||||
} else if (sysUserEntity.getEnabled() == 0) {
|
||||
DataEaseException.throwException(Translator.get("i18n_user_is_disable"));
|
||||
}
|
||||
TokenInfo tokenInfo = TokenInfo.builder().userId(sysUserEntity.getUserId()).username(sysUserEntity.getUsername()).build();
|
||||
String realPwd = sysUserEntity.getPassword();
|
||||
|
Loading…
Reference in New Issue
Block a user