Skip to content

Commit 619c754

Browse files
author
Hoang Nguyen
authored
Clear cache APIs when the switch domain with SAML user (apache#5855)
1 parent c86b98e commit 619c754

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

ui/src/components/header/SamlDomainSwitcher.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export default {
103103
userid: account.userId,
104104
domainid: account.domainId
105105
}).then(response => {
106-
store.dispatch('GetInfo').then(() => {
106+
store.dispatch('GetInfo', true).then(() => {
107107
this.$message.success(`Switched to "${account.accountName} (${account.domainPath})"`)
108108
this.$router.go()
109109
})

ui/src/store/modules/user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ const user = {
175175
})
176176
},
177177

178-
GetInfo ({ commit }) {
178+
GetInfo ({ commit }, switchDomain) {
179179
return new Promise((resolve, reject) => {
180-
const cachedApis = Vue.ls.get(APIS, {})
180+
const cachedApis = switchDomain ? {} : Vue.ls.get(APIS, {})
181181
const cachedZones = Vue.ls.get(ZONES, [])
182182
const cachedTimezoneOffset = Vue.ls.get(TIMEZONE_OFFSET, 0.0)
183183
const cachedUseBrowserTimezone = Vue.ls.get(USE_BROWSER_TIMEZONE, false)

0 commit comments

Comments
 (0)