From 4866fd396ac43895397c82acc9b559bbbb625096 Mon Sep 17 00:00:00 2001 From: Debora Crescenzo Date: Tue, 17 Sep 2024 09:50:25 +0100 Subject: [PATCH] MT#60689 Dynamic password requirements Password requirements have been edited so that are not hardcoded. They are stored in the config.yaml file and passed to the frontend through the platforminfo.security.password object. We adapt the frontend to: - pick this info - display the precise requirements in a tooltip that appears when users hoover on a password field - adapt the relevant inputs validations accordingly - update the password components to use the centralised $errMsg() function to handle error messages. - fix weird behaviour of retype password where was not showing validation errors - remove "score > 2" as a necessary condition to enable the retype field Change-Id: I0feea3d7c5c2ae977402c3576e883899117f8864 (cherry picked from commit 0b0846d7e785ca60fed6d02dd4576aa5ec4646d2) (cherry picked from commit 3a3764e9a4dbe34d09b800b621862cedc08639cc) --- src/components/form/CscChangePasswordForm.vue | 106 +++++++++++----- .../form/CscInputPasswordRetype.vue | 114 +++++++++++++++--- .../PbxConfiguration/CscPbxSeatAddForm.vue | 56 +++------ .../UserSettings/CscChangePasswordEmbeded.vue | 5 + src/i18n/it.json | 2 +- src/pages/CscPageUserSettings.vue | 13 +- src/store/user.js | 3 + src/validators/index.js | 24 ++++ 8 files changed, 226 insertions(+), 97 deletions(-) diff --git a/src/components/form/CscChangePasswordForm.vue b/src/components/form/CscChangePasswordForm.vue index 7ba5f389..c8899aca 100644 --- a/src/components/form/CscChangePasswordForm.vue +++ b/src/components/form/CscChangePasswordForm.vue @@ -11,7 +11,7 @@ :label="$t('Password')" :disable="loading" :error="v$.password.$errors.length > 0" - :error-message="errorMessagePass" + :error-message="$errMsg(v$.password.$errors)" @blur="v$.password.$touch()" /> @@ -38,11 +38,10 @@