Clear cache APIs when the switch domain with SAML user (#5855)

This commit is contained in:
Hoang Nguyen 2022-01-14 17:50:56 +07:00 committed by GitHub
parent c86b98e682
commit 619c754903
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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()
})

View File

@ -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)