Merge pull request #1934 from jumpserver/dev

v2.24.0-rc1
This commit is contained in:
Jiangjie.Bai
2022-07-14 18:27:51 +08:00
committed by GitHub
4 changed files with 9 additions and 12 deletions

View File

@@ -7,6 +7,7 @@ const getters = {
consoleOrgs: state => state.users.consoleOrgs,
auditOrgs: state => state.users.auditOrgs,
workbenchOrgs: state => state.users.workbenchOrgs,
notRootWorkbenchOrgs: state => state.users.notRootWorkbenchOrgs,
usingOrgs: state => state.users.usingOrgs,
currentOrg: state => state.users.currentOrg,
currentOrgIsDefault: state => state.users.currentOrg['is_default'],

View File

@@ -17,6 +17,7 @@ const getDefaultState = () => {
auditOrgs: [],
consoleOrgs: [],
workbenchOrgs: [],
notRootWorkbenchOrgs: [],
usingOrgs: [],
perms: [],
MFAVerifyAt: null,
@@ -42,6 +43,9 @@ const mutations = {
state.perms = profile.perms
state.consoleOrgs = profile['console_orgs']
state.workbenchOrgs = profile['workbench_orgs']
state.notRootWorkbenchOrgs = profile['workbench_orgs'].filter(item => {
return item.id !== '00000000-0000-0000-0000-000000000000'
})
state.auditOrgs = profile['audit_orgs']
state.currentOrg = getCurrentOrgLocal(profile.username)
},

View File

@@ -127,9 +127,7 @@ export default {
component: Select2,
el: {
multiple: false,
options: this.$store.state.users.workbenchOrgs.filter(item => {
return item.id !== '00000000-0000-0000-0000-000000000000'
})?.map((item) => {
options: this.$store.state.users.notRootWorkbenchOrgs?.map((item) => {
return { label: item.name, value: item.id }
})
},
@@ -163,9 +161,7 @@ export default {
},
computed: {
...mapState({
workbenchOrgs: state => state.users.workbenchOrgs.filter(item => {
return item.id !== '00000000-0000-0000-0000-000000000000'
})
workbenchOrgs: state => state.users.notRootWorkbenchOrgs
}),
...mapGetters(['currentOrg'])
},

View File

@@ -105,9 +105,7 @@ export default {
component: Select2,
el: {
multiple: false,
options: this.$store.state.users.workbenchOrgs.filter(item => {
return item.id !== '00000000-0000-0000-0000-000000000000'
})?.map((item) => {
options: this.$store.state.users.notRootWorkbenchOrgs?.map((item) => {
return { label: item.name, value: item.id }
})
},
@@ -137,9 +135,7 @@ export default {
},
computed: {
...mapState({
workbenchOrgs: state => state.users.workbenchOrgs.filter(item => {
return item.id !== '00000000-0000-0000-0000-000000000000'
})
workbenchOrgs: state => state.users.notRootWorkbenchOrgs
}),
...mapGetters(['currentOrg'])
},