fix: 修复切换组织时权限展示问题

Closes https://github.com/jumpserver/trello/issues/332
This commit is contained in:
Orange
2020-09-16 19:26:08 +08:00
parent 6e548749e1
commit ace1dcd0b8

View File

@@ -36,13 +36,16 @@ function hasCurrentOrgPermission() {
return orgInList
}
function changeOrg(orgId) {
async function changeOrg(orgId) {
const org = getOrgIdMapper()[orgId]
if (!org) {
console.debug('Error: org not found')
} else {
console.debug('Change to org: ', org)
}
// 重置Role为空
await store.dispatch('users/setCurrentRole', null)
store.dispatch('users/setCurrentOrg', org).then(() => {
console.log('Set current org to: ', org)
if (hasUUID(location.href)) {