Unverified Commit c1349953 authored by gaoyan's avatar gaoyan Committed by GitHub

LDAP is prohibited in conflict with the local user. (#2050)

* LDAP is prohibited in conflict with the local user. * LDAP is prohibited in conflict with the local user.
parent 0b77ae0a
......@@ -229,6 +229,8 @@ public class UserServiceImpl extends SuperServiceImpl<UserMapper, User> implemen
userIds.add(user.getId());
tenantService.assignUserToTenant(new AssignUserToTenantParams(tenant.getId(), userIds));
return user;
} else if (userFromLocal.getUserType() != UserType.LDAP.getCode()) {
throw new AuthException(Status.LDAP_LOGIN_FORBID);
}
// If local database have the user and ldap login is pass,
......
......@@ -210,6 +210,11 @@ public enum Status {
"If the user filter rule cannot be empty, enter the relevant configuration",
"用户过滤规则不能为空,请填写相关配置"),
LDAP_LOGIN_FORBID(
18007,
"If the current user login mode is not LDAP, contact the administrator to modify it, or do not use LDAP to log in",
"当前用户登录模式不是LDAP,请联系管理员修改,或不使用LDAP登录"),
/** global exception */
GLOBAL_PARAMS_CHECK_ERROR(90001, "Field: {0}, {1}", "字段: {0}, {1}"),
GLOBAL_PARAMS_CHECK_ERROR_VALUE(90002, "Field: {0}, Illegal Value: {1}", "字段: {0}, 不合法的值: {1}"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment