mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-23 08:59:05 +00:00
Merge pull request #132 from jumpserver/fix_ldap_setting
fix: 优化Ldap认证设置
This commit is contained in:
commit
fe84cf42eb
@ -51,6 +51,14 @@ export function refreshLdapUserCache() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function StartLdapUserCache() {
|
||||||
|
return request({
|
||||||
|
disableFlashErrorMsg: true,
|
||||||
|
url: '/api/v1/settings/ldap/users/?cache_police=1',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function importLdapUser(data) {
|
export function importLdapUser(data) {
|
||||||
return request({
|
return request({
|
||||||
disableFlashErrorMsg: true,
|
disableFlashErrorMsg: true,
|
||||||
|
@ -667,7 +667,8 @@
|
|||||||
"testLdapLoginTitle": "测试LDAP 用户登录",
|
"testLdapLoginTitle": "测试LDAP 用户登录",
|
||||||
"userGuideUrl": "用户向导URL",
|
"userGuideUrl": "用户向导URL",
|
||||||
"username": "用户名",
|
"username": "用户名",
|
||||||
"usernamePlaceholder": "请输入用户名"
|
"usernamePlaceholder": "请输入用户名",
|
||||||
|
"refreshLdapCache":"刷新Ldap缓存,请稍后"
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"setting": "设置"
|
"setting": "设置"
|
||||||
|
@ -667,7 +667,8 @@
|
|||||||
"testLdapLoginTitle": "Test LDAP user login",
|
"testLdapLoginTitle": "Test LDAP user login",
|
||||||
"userGuideUrl": "User Guide URL",
|
"userGuideUrl": "User Guide URL",
|
||||||
"username": "Username",
|
"username": "Username",
|
||||||
"usernamePlaceholder": "Please input username"
|
"usernamePlaceholder": "Please input username",
|
||||||
|
"refreshLdapCache":"Refreshing Ldap cache "
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"setting": "Setting"
|
"setting": "Setting"
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm'
|
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm'
|
||||||
import { testLdapSetting, testLdapUserLogin,
|
import { testLdapSetting, testLdapUserLogin,
|
||||||
importLdapUser, refreshLdapUserCache } from '@/api/settings'
|
importLdapUser, refreshLdapUserCache, StartLdapUserCache } from '@/api/settings'
|
||||||
import ListTable from '@/components/ListTable'
|
import ListTable from '@/components/ListTable'
|
||||||
import { IBox } from '@/components'
|
import { IBox } from '@/components'
|
||||||
|
|
||||||
@ -192,7 +192,8 @@ export default {
|
|||||||
can: true,
|
can: true,
|
||||||
callback: function() {
|
callback: function() {
|
||||||
refreshLdapUserCache().then(res => {
|
refreshLdapUserCache().then(res => {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(this.$t('setting.refreshLdapCache'))
|
||||||
|
StartLdapUserCache()
|
||||||
})
|
})
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
}
|
}
|
||||||
@ -242,7 +243,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handlerListTableXHRError(errMsg) {
|
handlerListTableXHRError(errMsg) {
|
||||||
if (this.dialogLdapUserImport) {
|
if (this.dialogLdapUserImport) {
|
||||||
setTimeout(this.$refs.listTable.reloadTable, 3000)
|
setTimeout(this.$refs.listTable.reloadTable, 30000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit cfb60f09fcc75def80d1214abcd68b5cb4b1a76e
|
Subproject commit d247da036f22261afa2bd89523e552cb6407327d
|
Loading…
Reference in New Issue
Block a user