mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
@@ -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'],
|
||||
|
||||
@@ -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)
|
||||
},
|
||||
|
||||
@@ -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'])
|
||||
},
|
||||
|
||||
@@ -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'])
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user