summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSandeepa Singh <sandeepa.singh@ibm.com>2021-06-01 13:27:33 +0300
committerDerick Montague <derick.montague@ibm.com>2021-06-28 16:39:55 +0300
commitd2422c44edfdbf678c3faf21594a16d816a7788e (patch)
tree8333543283c146fe201ec3f17bde180a2e38fd0c /src
parent6641cc489d053d6978868b94ddfb3dc93fd96dde (diff)
downloadwebui-vue-d2422c44edfdbf678c3faf21594a16d816a7788e.tar.xz
Resolve a bug in LDAP page
-Issue was, while the Enable checkbox is disabled, click on the save settings button, and then the page is getting disabled. Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com> Change-Id: Ib7cab16d99dab5296e7bafff1cdb936a4a535c6b
Diffstat (limited to 'src')
-rw-r--r--src/store/modules/AccessControl/LdapStore.js32
-rw-r--r--src/views/AccessControl/Ldap/Ldap.vue10
2 files changed, 29 insertions, 13 deletions
diff --git a/src/store/modules/AccessControl/LdapStore.js b/src/store/modules/AccessControl/LdapStore.js
index 722384c1..5aa31c2d 100644
--- a/src/store/modules/AccessControl/LdapStore.js
+++ b/src/store/modules/AccessControl/LdapStore.js
@@ -46,36 +46,48 @@ const LdapStore = {
state,
{
ServiceEnabled,
- ServiceAddresses,
+ ServiceAddresses = [],
Authentication = {},
- LDAPService: { SearchSettings = {} } = {},
+ LDAPService: {
+ SearchSettings: {
+ BaseDistinguishedNames = [],
+ UsernameAttribute,
+ GroupsAttribute,
+ } = {},
+ } = {},
RemoteRoleMapping = [],
}
) => {
state.ldap.serviceAddress = ServiceAddresses[0];
state.ldap.serviceEnabled = ServiceEnabled;
- state.ldap.baseDn = SearchSettings.BaseDistinguishedNames[0];
+ state.ldap.baseDn = BaseDistinguishedNames[0];
state.ldap.bindDn = Authentication.Username;
- state.ldap.userAttribute = SearchSettings.UsernameAttribute;
- state.ldap.groupsAttribute = SearchSettings.GroupsAttribute;
+ state.ldap.userAttribute = UsernameAttribute;
+ state.ldap.groupsAttribute = GroupsAttribute;
state.ldap.roleGroups = RemoteRoleMapping;
},
setActiveDirectoryProperties: (
state,
{
ServiceEnabled,
- ServiceAddresses,
+ ServiceAddresses = [],
Authentication = {},
- LDAPService: { SearchSettings = {} } = {},
+ LDAPService: {
+ SearchSettings: {
+ BaseDistinguishedNames = [],
+ UsernameAttribute,
+ GroupsAttribute,
+ } = {},
+ } = {},
RemoteRoleMapping = [],
}
) => {
state.activeDirectory.serviceEnabled = ServiceEnabled;
state.activeDirectory.serviceAddress = ServiceAddresses[0];
state.activeDirectory.bindDn = Authentication.Username;
- state.activeDirectory.baseDn = SearchSettings.BaseDistinguishedNames[0];
- state.activeDirectory.userAttribute = SearchSettings.UsernameAttribute;
- state.activeDirectory.groupsAttribute = SearchSettings.GroupsAttribute;
+ state.activeDirectory.baseDn = BaseDistinguishedNames[0];
+ state.activeDirectory.userAttribute = UsernameAttribute;
+ state.activeDirectory.groupsAttribute = GroupsAttribute;
state.activeDirectory.roleGroups = RemoteRoleMapping;
},
},
diff --git a/src/views/AccessControl/Ldap/Ldap.vue b/src/views/AccessControl/Ldap/Ldap.vue
index 25e50cbf..78bb830b 100644
--- a/src/views/AccessControl/Ldap/Ldap.vue
+++ b/src/views/AccessControl/Ldap/Ldap.vue
@@ -350,7 +350,9 @@ export default {
this.$store
.dispatch('ldap/getAccountSettings')
.finally(() => this.endLoader());
- this.$store.dispatch('sslCertificates/getCertificates');
+ this.$store
+ .dispatch('sslCertificates/getCertificates')
+ .finally(() => this.endLoader());
this.setFormValues();
},
methods: {
@@ -398,11 +400,13 @@ export default {
.dispatch('ldap/saveAccountSettings', data)
.then((success) => {
this.successToast(success);
- this.$v.form.$reset();
})
- .catch(({ message }) => this.errorToast(message))
+ .catch(({ message }) => {
+ this.errorToast(message);
+ })
.finally(() => {
this.form.bindPassword = '';
+ this.$v.form.$reset();
this.endLoader();
});
},