fix(ldap): 修复LDAP一键导入不选择用户,导入了全部用户的问题

This commit is contained in:
jym503558564
2020-07-14 17:01:38 +08:00
committed by 老广
parent ad423e921a
commit 58b8917739
3 changed files with 9 additions and 3 deletions

View File

@@ -584,6 +584,7 @@
"authLdapSearchOu": "用户OU",
"authLdapServerUri": "LDAP地址",
"authLdapUserAttrMap": "LDAP属性映射",
"unselectedUser": "没有选择用户",
"auto": "自动",
"basicSetting": "基本设置",
"communityEdition": "社区版",

View File

@@ -583,6 +583,7 @@
"authLdapSearchOu": "User OU",
"authLdapServerUri": "LDAP server",
"authLdapUserAttrMap": "User attr map",
"unselectedUser": "Unselected user",
"auto": "Auto",
"basicSetting": "Basic setting",
"communityEdition": "Community edition",

View File

@@ -237,9 +237,13 @@ export default {
const data = {
username_list: selectIds
}
importLdapUser(data).then(res => {
this.$message.success(res.msg)
})
if (selectIds.length === 0) {
this.$message.error(this.$t('setting.unselectedUser'))
} else {
importLdapUser(data).then(res => {
this.$message.success(res.msg)
})
}
},
handlerListTableXHRError(errMsg) {
if (this.dialogLdapUserImport) {