Fix ldap/ad group webui settings (#12967)

* Fix LDAP groups UI WIP

* fix up ldap and ad group settings

* production compiled assets
This commit is contained in:
Tony Murray
2021-06-19 09:16:02 -05:00
committed by GitHub
parent fb36f0bc60
commit 50dd6c1685
8 changed files with 8482 additions and 5790 deletions

View File

@@ -32,7 +32,7 @@
@blur="updateItem(group, $event.target.value)"
@keyup.enter="updateItem(group, $event.target.value)"
>
<span class="input-group-btn" style="width:0;"></span>
<span class="input-group-btn" style=" width:0;"></span>
<select class="form-control" @change="updateLevel(group, $event.target.value)">
<option value="1" :selected="data.level === 1">{{ $t('Normal') }}</option>
<option value="5" :selected="data.level === 5">{{ $t('Global Read') }}</option>
@@ -60,16 +60,17 @@
</template>
<script>
import BaseSetting from "./BaseSetting";
import BaseSetting from "./BaseSetting";
export default {
export default {
name: "SettingLdapGroups",
mixins: [BaseSetting],
data() {
return {
localList: this.value,
localList: Array.isArray(this.value) ? {} : this.value,
newItem: "",
newItemLevel: 1
newItemLevel: 1,
lock: false
}
},
methods: {
@@ -94,7 +95,16 @@
},
watch: {
localList() {
this.$emit('input', this.localList)
if (! this.lock) {
this.$emit('input', this.localList)
} else {
// release the lock
this.lock = false;
}
},
value() {
this.lock = true // prevent loop
this.localList = Array.isArray(this.value) ? {} : this.value;
}
}
}