提交 5a8091df 编写于 作者: NoSubject's avatar NoSubject

Merge branch 'revert-0b2f1f13' into 'master'

Revert "修改ldap配置参数"

See merge request o2oa/o2oa!1032
......@@ -405,18 +405,11 @@ o2.xApplication.systemconfig.LP = {
"ldapAuthUrlInfo": "Ldap服务地址,ldap://域名或IP:端口",
"baseDn": "LDAP查询根(BaseDN)",
"baseDnInfo": "LDAP查询的根名称,如:dc=zone,DC=COM",
"userDn": "认证用户绑定属性",
"userDnInfo": "认证用户绑定属性:uid、手机号、员工编码或邮箱(需确保在baseDn下查找到的数据是唯一的并且在o2能查到关联人员, 如: uid 或 mail等",
"userDn": "认证用户的DN(UserDN)",
"userDnInfo": "认证用户的DN(UserDN), 如:uid=*,ou=users,dc=zone,DC=COM,其中uid=*中的*表示用户的唯一编码,此唯一编码与O2用户的唯一编码对应",
"superPermission": "启用超级管理员口令",
"superPermissionInfo": "开启此项允许用超级管理员(xadmin)的口令登录其他用户账户,以方便管理员用普通用户的身份进行数据维护和故障排除。",
"bindDnUser": "绑定管理用户",
"bindDnUserInfo": "绑定一个管理员(需有管理权限的用户),用于查询认证,如:cn=root",
"bindDnPwd": "管理用户密码",
"bindDnPwdInfo": "绑定管理员的密码",
"ldapEnabledError": "请完整配置所有LDAP参数后,再启用LDAP认证"
"superPermissionInfo": "开启此项允许用超级管理员(xadmin)的口令登录其他用户账户,以方便管理员用普通用户的身份进行数据维护和故障排除。"
},
"_ssoConfig": {
"ssoConfig": "鉴权密钥配置",
......
......@@ -4,13 +4,13 @@
<div class="item_info">{{lp._loginConfig.ldapAuthEnableInfo}}</div>
<div class="item_info">
<el-switch
@change="enableLdap"
@change="saveConfig('token', 'ldapAuth.enable', ldapAuthEnable)"
v-model="ldapAuthEnable"
:active-text="lp.operation.enable" :inactive-text="lp.operation.disable">
</el-switch>
</div>
<div>
<div v-if="!!ldapAuthEnable">
<BaseItem
:title="lp._loginConfig.ldapAuthUrl"
:info="lp._loginConfig.ldapAuthUrlInfo"
......@@ -32,28 +32,13 @@
:allowEditor="true"
type="text"
@changeConfig="(value)=>{userDn = value; saveConfig('token', 'ldapAuth.userDn', value)}"></BaseItem>
<BaseItem
:title="lp._loginConfig.bindDnUser"
:info="lp._loginConfig.bindDnUserInfo"
:config="bindDnUser"
:allowEditor="true"
type="text"
@changeConfig="(value)=>{bindDnUser = value; saveConfig('token', 'ldapAuth.bindDnUser', value)}"></BaseItem>
<BaseItem
:title="lp._loginConfig.bindDnPwd"
:info="lp._loginConfig.bindDnPwdInfo"
:config="bindDnPwd"
:allowEditor="true"
type="password"
:options="{'show-password': true}"
@changeConfig="(value)=>{bindDnPwd = value; saveConfig('token', 'ldapAuth.bindDnPwd', value)}"></BaseItem>
</div>
</div>
</template>
<script setup>
import {ref} from 'vue';
import {lp, component} from '@o2oa/component';
import {lp} from '@o2oa/component';
import BaseItem from '@/components/item/BaseItem.vue';
import {getConfigData, getConfig, saveConfig} from '@/util/acrions';
......@@ -61,17 +46,6 @@ const ldapAuthEnable = ref(false);
const ldapAuthUrl = ref('');
const baseDn = ref('');
const userDn = ref('');
const bindDnUser = ref('');
const bindDnPwd = ref('');
const enableLdap = (value)=>{
if (!!value && (!ldapAuthUrl.value || !baseDn.value || !userDn.value || !bindDnUser.value || !bindDnPwd.value)){
component.notice(lp._loginConfig.ldapEnabledError, 'error');
ldapAuthEnable.value = false;
}else{
saveConfig('token', 'ldapAuth.enable', ldapAuthEnable.value);
}
}
const load = async () => {
const data = await getConfigData('token');
......@@ -80,8 +54,6 @@ const load = async () => {
ldapAuthUrl.value = data.ldapAuth.ldapUrl || '';
baseDn.value = data.ldapAuth.baseDn || '';
userDn.value = data.ldapAuth.userDn || '';
bindDnUser.value = data.ldapAuth.bindDnUser || '';
bindDnPwd.value = data.ldapAuth.bindDnPwd || '';
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册