From edeaab54047bcd304b7038549f81e20dd60629dd Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 23 Feb 2023 07:35:00 +0000 Subject: [PATCH] Add verification before permitting password change (#839) Verify current password before allowing staff or clients to change password (#541). API Endpoints Changed /api/admin/profile/change_password Required fields: current_password - Current admin user password. new_password - New admin user password. confirm_password - New admin user password confirmation. /api/client/profile/change_password Required fields: current_password - Current client user password. new_password - New client user password. confirm_password - New client user password confirmation. Affected Theme Files mod_client_profile.html.twig mod_staff_profile.html.twig --- .../html_client/mod_client_profile.html.twig | 65 ++++++++----------- src/modules/Profile/Api/Admin.php | 30 +++++---- src/modules/Profile/Api/Client.php | 30 +++++++-- src/modules/Profile/Service.php | 8 +-- .../html_admin/mod_staff_profile.html.twig | 20 ++++-- 5 files changed, 85 insertions(+), 68 deletions(-) diff --git a/src/modules/Client/html_client/mod_client_profile.html.twig b/src/modules/Client/html_client/mod_client_profile.html.twig index 77ab535ac..0e216d17e 100644 --- a/src/modules/Client/html_client/mod_client_profile.html.twig +++ b/src/modules/Client/html_client/mod_client_profile.html.twig @@ -19,7 +19,7 @@
@@ -206,33 +206,36 @@
-
+
-

{{ 'New password'|trans }}

+

{{ 'Change Password'|trans }}

{{ 'Please enter new password two times in order avoid mistypes'|trans }}

-
+ -
-
- -
- -

-
-
- -
- -
- -

-
-
-
- -
-
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +

{{ 'API key'|trans }}

@@ -278,19 +281,7 @@ {% block js %}