ui: Display 'Add LDAP Account' button when LDAP configuration is added (#4971)

Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
This commit is contained in:
Pearl Dsilva 2021-04-29 15:52:12 +05:30 committed by GitHub
parent 98e2ed3c4f
commit 39cb2bf0af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -325,7 +325,16 @@ const user = {
})
})
},
UpdateConfiguration ({ commit }) {
return new Promise((resolve, reject) => {
api('listLdapConfigurations').then(response => {
const ldapEnable = (response.ldapconfigurationresponse.count > 0)
commit('SET_LDAP', ldapEnable)
}).catch(error => {
reject(error)
})
})
},
SetDomainStore ({ commit }, domainStore) {
commit('SET_DOMAIN_STORE', domainStore)
}

View File

@ -963,6 +963,9 @@ export default {
break
}
}
if (['addLdapConfiguration', 'deleteLdapConfiguration'].includes(action.api)) {
this.$store.dispatch('UpdateConfiguration')
}
return false
},
execSubmit (e) {