Skip to content

Commit 39cb2bf

Browse files
Pearl1594Pearl Dsilva
andauthored
ui: Display 'Add LDAP Account' button when LDAP configuration is added (apache#4971)
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
1 parent 98e2ed3 commit 39cb2bf

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

ui/src/store/modules/user.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,16 @@ const user = {
325325
})
326326
})
327327
},
328-
328+
UpdateConfiguration ({ commit }) {
329+
return new Promise((resolve, reject) => {
330+
api('listLdapConfigurations').then(response => {
331+
const ldapEnable = (response.ldapconfigurationresponse.count > 0)
332+
commit('SET_LDAP', ldapEnable)
333+
}).catch(error => {
334+
reject(error)
335+
})
336+
})
337+
},
329338
SetDomainStore ({ commit }, domainStore) {
330339
commit('SET_DOMAIN_STORE', domainStore)
331340
}

ui/src/views/AutogenView.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -963,6 +963,9 @@ export default {
963963
break
964964
}
965965
}
966+
if (['addLdapConfiguration', 'deleteLdapConfiguration'].includes(action.api)) {
967+
this.$store.dispatch('UpdateConfiguration')
968+
}
966969
return false
967970
},
968971
execSubmit (e) {

0 commit comments

Comments
 (0)