Commit 4061b495 authored by janis.streib's avatar janis.streib 🦉
Browse files

FIX: correct global oe-list

parent 6a2d0540
Pipeline #113265 passed with stages
in 8 minutes and 32 seconds
import TransactionService from './transaction.service'
export default {
list (config, own) {
listOwn(config) {
const ta = [
{ name: 'cntl.mgr2ou.list', old: { is_own: own } },
{ name: 'cntl.mgr2ou.list', old: { is_own: true } },
{ name: 'org.unit.list', join: { 0: 'api_fkey_cntl_mgr2ou_ou' } },
{ name: 'cntl.mgr2ou.list', join: { 1: 'api_fkey_cntl_mgr2ou_ou'} },
{ name: 'cntl.mgr.list', join: { 2: 'api_fkey_cntl_mgr2ou_mgr'} }
{ name: 'cntl.mgr2ou.list', join: { 1: 'api_fkey_cntl_mgr2ou_ou' } },
{ name: 'cntl.mgr.list', join: { 2: 'api_fkey_cntl_mgr2ou_mgr' } }
]
return TransactionService.execute(config, ta)
},
listAll(config) {
const ta = [
{ name: 'org.unit.list', old: {do_subtree: true}},
{ name: 'cntl.mgr2ou.list', join: { 0: 'api_fkey_cntl_mgr2ou_ou' } },
{ name: 'cntl.mgr.list', join: { 1: 'api_fkey_cntl_mgr2ou_mgr' } }
]
return TransactionService.execute(config, ta)
}
......
......@@ -9,7 +9,7 @@
Durch Untergruppen wird es ermöglicht,
<b-link to="/user/tokens">Unterkonten</b-link>
auf einen Teil der Zuordungen der Gruppen des Hauptkontos einzuschränken.
So kann eine höhere Sicherheit Ihrer API-Anweundgen erziehlt werden.
So kann eine höhere Sicherheit Ihrer API-Anwendungen erziehlt werden.
</p>
<hr/>
<Loading :data="[groups]">
......
<template>
<div class="oe-overview">
<h1>Organisationseinheiten</h1>
<b-checkbox :value="true" :unchecked-value="false" v-model="only_own_oe" switch>Nur eigene Organisationseinheiten anzeigen
<b-checkbox :value="true" :unchecked-value="false" v-model="only_own_oe" switch>Nur eigene Organisationseinheiten
anzeigen
</b-checkbox>
<hr/>
<Loading :data="[ous, mgrs]">
......@@ -65,8 +66,10 @@
Keine Organisationseinheiten vorhanden
</div>
</Loading>
<DBEditor modal_id="assign_user_to_oe" object_function="create" object_fq_name="cntl.mgr2ou" :presets="db_editor_presets"
:non_optionals_order="['ou_short_name', 'mgr_login_name']" object_title="Konto-zu-Organisationseinheits-Zuordnung"></DBEditor>
<DBEditor modal_id="assign_user_to_oe" object_function="create" object_fq_name="cntl.mgr2ou"
:presets="db_editor_presets"
:non_optionals_order="['ou_short_name', 'mgr_login_name']"
object_title="Konto-zu-Organisationseinheits-Zuordnung"></DBEditor>
</div>
</template>
......@@ -128,13 +131,21 @@ export default {
methods: {
async refresh() {
this.mgrs = this.mgrs2ou = this.ous = null
const res = (await OUService.list(this.$store.state.netdb_axios_config, this.only_own_oe)).data
this.mgrs2ou = apiutil.dict_of_lists_by_value_of_array(res[2], 'ou_short_name')
this.mgrs = apiutil.dict_by_value_of_array(res[3], 'login_name')
this.ous = res[1]
let res = null
if (this.only_own_oe) {
res = (await OUService.listOwn(this.$store.state.netdb_axios_config)).data
this.mgrs2ou = apiutil.dict_of_lists_by_value_of_array(res[2], 'ou_short_name')
this.mgrs = apiutil.dict_by_value_of_array(res[3], 'login_name')
this.ous = res[1]
} else {
res = (await OUService.listAll(this.$store.state.netdb_axios_config)).data
this.mgrs2ou = apiutil.dict_of_lists_by_value_of_array(res[1], 'ou_short_name')
this.mgrs = apiutil.dict_by_value_of_array(res[2], 'login_name')
this.ous = res[0]
}
},
assign_mgr(oe) {
this.db_editor_presets = { ou_short_name: oe }
this.db_editor_presets = {ou_short_name: oe}
this.$root.$emit('bv::show::modal', 'assign_user_to_oe')
},
deleteMgrItem(item) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment