[go: nahoru, domu]

Skip to content

Commit

Permalink
Clear cache APIs when the switch domain with SAML user (apache#5855)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoang Nguyen authored Jan 14, 2022
1 parent c86b98e commit 619c754
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ui/src/components/header/SamlDomainSwitcher.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
Expand Down
4 changes: 2 additions & 2 deletions ui/src/store/modules/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 619c754

Please sign in to comment.