fix(task5): add admin reset-password dialog in masters page

This commit is contained in:
Atharv1705
2026-11-17 18:07:50 +05:30
parent 5f649e3e4c
commit cb47017eac
5 changed files with 262 additions and 13 deletions
+1
View File
@@ -49,3 +49,4 @@ Items marked "to be confirmed" or left flexible in the proposal are recorded her
- Prohibited passwords: blocklist of common passwords (`123456`, `12345678`, `password`, `password1`, `qwerty123`, `admin123`, `welcome1`), while preserving `demo@123` for seeded testing environments.
- Username containment: cannot contain the user's email username (local part before `@`) if 4 or more characters.
- Password changes additionally require that the new password is not identical to the current password.
28. **Admin Reset Password Interface (Task 5)**: `frontend/src/api/users.ts` and `frontend/src/pages/MastersPage.tsx` expose an administrator password reset modal for users with role `system_admin`. The dialog features password masking toggles, client-side mismatch validation (`Passwords do not match`), universal password policy helper instructions, and displays backend 422 validation errors inline. Successful resets trigger a notification toast and close the modal without affecting the active administrator session.