From 7224770f0b3254e69dc959a90c333197b666980b Mon Sep 17 00:00:00 2001
From: Uwe Ilgenstein
Date: Tue, 17 Oct 2023 16:43:10 +0200
Subject: [PATCH] BC-5506: fix ldap sections v-model
---
.../organisms/Ldap/LdapClassesSection.vue | 32 +++++++-------
.../organisms/Ldap/LdapConnectionSection.vue | 28 ++++++-------
.../organisms/Ldap/LdapRolesSection.vue | 42 ++++++++++---------
.../organisms/Ldap/LdapUsersSection.vue | 40 +++++++++---------
4 files changed, 74 insertions(+), 68 deletions(-)
diff --git a/src/components/organisms/Ldap/LdapClassesSection.vue b/src/components/organisms/Ldap/LdapClassesSection.vue
index b7521922e0..fbed240a18 100644
--- a/src/components/organisms/Ldap/LdapClassesSection.vue
+++ b/src/components/organisms/Ldap/LdapClassesSection.vue
@@ -22,10 +22,10 @@
:placeholder="$t('pages.administration.ldap.classes.path.title')"
:label="$t('pages.administration.ldap.classes.path.title')"
:info="$t('pages.administration.ldap.classes.path.info')"
- :validation-model="v$.value.classPath"
+ :validation-model="v$.modelValue.classPath"
:validation-messages="classPathValidationMessage"
datatest-id="ldapDataClassesclassPath"
- @update:modelValue="$emit('input', { ...value, classPath: $event })"
+ @update:modelValue="$emit('input', { ...modelValue, classPath: $event })"
>
$mdiFileTreeOutline
@@ -36,15 +36,17 @@
@@ -84,7 +86,7 @@ export default defineComponent({
return { v$: useVuelidate() };
},
props: {
- value: {
+ modelValue: {
type: Object,
default() {
return {};
@@ -115,10 +117,10 @@ export default defineComponent({
if (this.checked === false) {
return "";
}
- return this.value.classPath;
+ return this.modelValue.classPath;
},
classPathChanged() {
- return this.value.classPath;
+ return this.modelValue.classPath;
},
},
watch: {
@@ -136,16 +138,16 @@ export default defineComponent({
}
},
classPathChanged: function () {
- this.checked = !!this.value.classPath;
+ this.checked = !!this.modelValue.classPath;
},
},
beforeMount() {
- if (this.value.classPath) this.checked = true;
+ if (this.modelValue.classPath) this.checked = true;
},
validations() {
if (this.checked === true) {
return {
- value: {
+ modelValue: {
classPath: {
required,
ldapPathRegexValidator: ldapPathRegexValidator,
@@ -156,7 +158,7 @@ export default defineComponent({
};
}
return {
- value: {},
+ modelValue: {},
};
},
});
diff --git a/src/components/organisms/Ldap/LdapConnectionSection.vue b/src/components/organisms/Ldap/LdapConnectionSection.vue
index ed9068b8ad..a6a374babd 100644
--- a/src/components/organisms/Ldap/LdapConnectionSection.vue
+++ b/src/components/organisms/Ldap/LdapConnectionSection.vue
@@ -6,15 +6,15 @@
$mdiDnsOutline
@@ -22,15 +22,15 @@
$mdiFileTreeOutline
@@ -38,15 +38,15 @@
$mdiAccountCircleOutline
@@ -54,17 +54,17 @@
$mdiLockOutline
@@ -88,7 +88,7 @@ export default defineComponent({
return { v$: useVuelidate() };
},
props: {
- value: {
+ modelValue: {
type: Object,
default() {
return {};
@@ -134,7 +134,7 @@ export default defineComponent({
},
validations() {
return {
- value: {
+ modelValue: {
url: {
required,
ldapURLValidator: this.insecureLDAPURLAllowed
diff --git a/src/components/organisms/Ldap/LdapRolesSection.vue b/src/components/organisms/Ldap/LdapRolesSection.vue
index 7bd6b76012..ebb3d1b69b 100644
--- a/src/components/organisms/Ldap/LdapRolesSection.vue
+++ b/src/components/organisms/Ldap/LdapRolesSection.vue
@@ -18,7 +18,9 @@
name="group"
style="margin-right: var(--space-sm)"
value="group"
- @update:modelValue="$emit('input', { ...value, groupOption: $event })"
+ @update:modelValue="
+ $emit('input', { ...modelValue, groupOption: $event })
+ "
>
@@ -37,7 +41,7 @@
$mdiAccountOutline
$mdiAccountSchoolOutline
$teacher
$mdiShieldAccountVariantOutline
$mdiAccountOffOutline
@@ -131,7 +135,7 @@ export default defineComponent({
return { v$: useVuelidate() };
},
props: {
- value: {
+ modelValue: {
type: Object,
default() {
return {};
@@ -157,7 +161,7 @@ export default defineComponent({
},
computed: {
groupOption() {
- return this.value.groupOption || "undefined";
+ return this.modelValue.groupOption || "undefined";
},
fillColor() {
@@ -180,7 +184,7 @@ export default defineComponent({
validations() {
if (this.groupOption === "group") {
return {
- value: {
+ modelValue: {
member: { required },
student: { ldapPathRegexValidator },
teacher: { ldapPathRegexValidator },
diff --git a/src/components/organisms/Ldap/LdapUsersSection.vue b/src/components/organisms/Ldap/LdapUsersSection.vue
index 53ccd06f64..3b955d6f17 100644
--- a/src/components/organisms/Ldap/LdapUsersSection.vue
+++ b/src/components/organisms/Ldap/LdapUsersSection.vue
@@ -9,16 +9,16 @@
$mdiFileTreeOutline
@@ -29,14 +29,14 @@
$mdiAccountCircleOutline
@@ -44,14 +44,14 @@
$mdiAccountCircleOutline
@@ -59,14 +59,14 @@
$mdiEmailOutline
@@ -74,15 +74,15 @@
$mdiCardAccountDetailsOutline
@@ -90,15 +90,15 @@
$mdiAccountBoxOutline
@@ -118,7 +118,7 @@ export default defineComponent({
return { v$: useVuelidate() };
},
props: {
- value: {
+ modelValue: {
type: Object,
default() {
return {};
@@ -155,7 +155,7 @@ export default defineComponent({
},
validations() {
return {
- value: {
+ modelValue: {
userPath: { required, ldapPathRegexValidator },
firstName: { required },
familyName: { required },