forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
2213a565f8
@ -91,6 +91,11 @@ public class AuthServer implements AuthApi {
|
||||
|
||||
SysUserEntity user = authUserService.getUserByName(username);
|
||||
|
||||
// 验证登录类型是否与用户类型相同
|
||||
if (!sysUserService.validateLoginType(user.getFrom(), loginType)) {
|
||||
DataEaseException.throwException(Translator.get("i18n_id_or_pwd_error"));
|
||||
}
|
||||
|
||||
if (ObjectUtils.isEmpty(user)) {
|
||||
DataEaseException.throwException(Translator.get("i18n_id_or_pwd_error"));
|
||||
}
|
||||
|
@ -156,6 +156,11 @@ public class SysUserService {
|
||||
});
|
||||
}
|
||||
|
||||
public boolean validateLoginType(Integer from, Integer loginType) {
|
||||
|
||||
return ObjectUtils.isNotEmpty(from) && ObjectUtils.isNotEmpty(loginType) && from == loginType;
|
||||
}
|
||||
|
||||
public List<String> ldapUserNames() {
|
||||
|
||||
List<String> usernames = extSysUserMapper.ldapUserNames(1);
|
||||
|
Loading…
Reference in New Issue
Block a user