|
|
@@ -50,6 +50,7 @@ Timeline:
|
|
|
|
|
|
- **Profile password change (RHL-009)**:
|
|
|
- Route: `/profile` (protected)
|
|
|
+ - Profile shows read-only account/session metadata (role, branch, email).
|
|
|
- Password change form calls `apiClient.changePassword({ currentPassword, newPassword })`.
|
|
|
- Uses inline validation for actionable form errors.
|
|
|
- Uses toast notifications (Sonner) for success/error feedback.
|
|
|
@@ -375,6 +376,11 @@ Behavior:
|
|
|
3. If `{ user: null }`:
|
|
|
- redirect to `/login?reason=expired&next=<current-url>`
|
|
|
|
|
|
+Notes:
|
|
|
+
|
|
|
+- `GET /api/auth/me` returns minimal identity data for the UI:
|
|
|
+ - `userId`, `role`, `branchId`, and (optionally) `email`.
|
|
|
+
|
|
|
The `next` parameter:
|
|
|
|
|
|
- includes the original `pathname` and query string
|
|
|
@@ -636,10 +642,13 @@ Rationale:
|
|
|
|
|
|
- `components/profile/ProfilePage.jsx`
|
|
|
- Renders:
|
|
|
- - Account/session info card
|
|
|
- - Email placeholder card
|
|
|
+ - Account/session info card (role, branch, read-only email)
|
|
|
- Password change card
|
|
|
|
|
|
+ Note:
|
|
|
+ - The email address is displayed read-only.
|
|
|
+ - Email changes are not supported in the UI; email is managed centrally (IT / developers).
|
|
|
+
|
|
|
- `components/profile/ChangePasswordCard.jsx`
|
|
|
- Contains a password change form:
|
|
|
- `currentPassword`
|
|
|
@@ -652,6 +661,7 @@ Rationale:
|
|
|
- new password equals current password
|
|
|
|
|
|
- Calls `apiClient.changePassword({ currentPassword, newPassword })`.
|
|
|
+
|
|
|
- Uses Sonner toasts for success/error feedback.
|
|
|
|
|
|
### 11.3 Password policy UX
|
|
|
@@ -804,7 +814,7 @@ Verify flows in the browser:
|
|
|
Profile checks (RHL-009):
|
|
|
|
|
|
- Open `/profile`
|
|
|
- - Confirm account info is visible
|
|
|
+ - Confirm account info is visible (including read-only email)
|
|
|
|
|
|
- Change password:
|
|
|
- wrong current password → inline error + toast
|
|
|
@@ -849,6 +859,7 @@ Deploy and verify on the server URL.
|
|
|
Verify:
|
|
|
|
|
|
- Explorer navigation and PDF open
|
|
|
+
|
|
|
- Search UI:
|
|
|
- scopes
|
|
|
- limit selection
|