This is an automated email from the ASF dual-hosted git repository.

sureshanaparti pushed a commit to branch 4.16
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.16 by this push:
     new 619c754  Clear cache APIs when the switch domain with SAML user (#5855)
619c754 is described below

commit 619c75490353809d158f87af9b4d3b2e5117165b
Author: Hoang Nguyen <[email protected]>
AuthorDate: Fri Jan 14 17:50:56 2022 +0700

    Clear cache APIs when the switch domain with SAML user (#5855)
---
 ui/src/components/header/SamlDomainSwitcher.vue | 2 +-
 ui/src/store/modules/user.js                    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ui/src/components/header/SamlDomainSwitcher.vue 
b/ui/src/components/header/SamlDomainSwitcher.vue
index 30c1583..8760aec 100644
--- a/ui/src/components/header/SamlDomainSwitcher.vue
+++ b/ui/src/components/header/SamlDomainSwitcher.vue
@@ -103,7 +103,7 @@ export default {
         userid: account.userId,
         domainid: account.domainId
       }).then(response => {
-        store.dispatch('GetInfo').then(() => {
+        store.dispatch('GetInfo', true).then(() => {
           this.$message.success(`Switched to "${account.accountName} 
(${account.domainPath})"`)
           this.$router.go()
         })
diff --git a/ui/src/store/modules/user.js b/ui/src/store/modules/user.js
index 6b05fe9..1ecf61f 100644
--- a/ui/src/store/modules/user.js
+++ b/ui/src/store/modules/user.js
@@ -175,9 +175,9 @@ const user = {
       })
     },
 
-    GetInfo ({ commit }) {
+    GetInfo ({ commit }, switchDomain) {
       return new Promise((resolve, reject) => {
-        const cachedApis = Vue.ls.get(APIS, {})
+        const cachedApis = switchDomain ? {} : Vue.ls.get(APIS, {})
         const cachedZones = Vue.ls.get(ZONES, [])
         const cachedTimezoneOffset = Vue.ls.get(TIMEZONE_OFFSET, 0.0)
         const cachedUseBrowserTimezone = Vue.ls.get(USE_BROWSER_TIMEZONE, 
false)

Reply via email to