diff --git a/client/web/admin/src/components/Settings/System/CSystemEditorAuth.vue b/client/web/admin/src/components/Settings/System/CSystemEditorAuth.vue index b2a291a2a5..6b45e52584 100644 --- a/client/web/admin/src/components/Settings/System/CSystemEditorAuth.vue +++ b/client/web/admin/src/components/Settings/System/CSystemEditorAuth.vue @@ -12,7 +12,7 @@
{{ $t('internal.title') }} @@ -28,7 +28,7 @@ label-class="text-primary" > @@ -273,16 +274,40 @@ label-class="text-primary" > + + + + + + + + + + +
+
@@ -312,35 +338,15 @@ label-class="text-primary" > - - - - - - - - - - @@ -381,7 +387,7 @@ > @@ -397,7 +403,7 @@ label-class="text-primary" > - + @@ -422,7 +428,7 @@ label-class="text-primary" > @@ -460,7 +466,7 @@ :success="success" :text="$t('admin:general.label.submit')" class="ml-auto" - @submit="$emit('submit', settings)" + @submit="$emit('submit', authSettings)" /> @@ -500,6 +506,8 @@ export default { data () { return { + authSettings: {}, + defaultMinPwd: 8, defaultMinUppCaseChrs: 0, defaultMinLowCaseChrs: 0, @@ -509,5 +517,29 @@ export default { }, } }, + + watch: { + settings: { + immediate: true, + deep: true, + handler () { + this.authSettings = this.settings + }, + }, + }, + + methods: { + handleEmailOTPEnabledChange (value) { + if (!value) { + this.authSettings['auth.multi-factor.email-otp.enforced'] = false + } + }, + + handleTOTPEnabledChange (value) { + if (!value) { + this.authSettings['auth.multi-factor.totp.enforced'] = false + } + }, + }, }