From 937def533aa11b45974ffb82aac14a4da4fc7750 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 2 Jun 2021 13:48:59 +0530 Subject: [PATCH] ui: fix adduser form (#5063) AddUser form wrongly shows the account dropdown when adding a user for an account. Account dropdown remains empty in the form. When an account is not selected prior to opening the form, the account input should be required. Signed-off-by: Abhishek Kumar --- ui/src/views/iam/AddUser.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/src/views/iam/AddUser.vue b/ui/src/views/iam/AddUser.vue index 8ef88eb64ce..efec6657f54 100644 --- a/ui/src/views/iam/AddUser.vue +++ b/ui/src/views/iam/AddUser.vue @@ -137,7 +137,9 @@ @@ -225,7 +227,7 @@ export default { this.apiConfig.params.forEach(param => { this.apiParams[param.name] = param }) - this.apiConfig = this.$store.getters.apis.authorizeSamlSso || {} + this.apiConfig = this.$store.getters.apis.authorizeSamlSso || { params: [] } this.apiConfig.params.forEach(param => { this.apiParams[param.name] = param }) @@ -319,7 +321,7 @@ export default { if (this.account) { params.account = this.account - } else if (values.account) { + } else if (this.accountList[values.account]) { params.account = this.accountList[values.account].name }