As a user I want a profile page so I can change my password and keep my personal information up to date #35
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
Passwords are currently set by the admin. Users have no way to change them. There is also no place to store personal information (display name, birthday, contact details). The email field added here is a prerequisite for the forgot-password feature (#36).
Desired behaviour
/profilepage is accessible to every logged-in userPublic profile pages
All user profiles are publicly visible to any logged-in user at
/users/{id}(read-only). This is the natural entry point from:/users/{id}/users/{id}The authenticated user's own
/profileis the editable version of the same data. No separate user directory is needed — discovery happens organically through history and annotations.UI / navigation
Replace the plain "Logout" link in the global nav bar with a person icon button. Clicking it opens a small dropdown menu containing:
/profileThe dropdown must be fully keyboard accessible: Tab to reach the button, Enter/Space to open, arrow keys to navigate items, Escape to close, focus returns to the trigger button on close. On mobile it is tap-to-open; tapping outside or pressing Escape closes it.
The icon should show the user's initials if first/last name are set, or a generic person SVG as fallback (e.g. on first login before the profile is filled in).
Implementation notes
Backend
New Flyway migration — add columns to
app_users:New endpoints (all require only the
READ_ALLpermission — every logged-in user can call them):GET/api/users/mePUT/api/users/mePOST/api/users/me/passwordGET/api/users/{id}POST /api/users/me/passwordbody:The service must:
currentPasswordagainst the stored hash — return400with a clear error if it does not matchSessionRepositoryquery by principal name, filter out current session ID)PUT /api/users/mereturns409 Conflictif the supplied email is already in use by another account.Frontend
src/routes/profile/(editable, self only)src/routes/users/[id]/(read-only public view)<form>anduse:enhancede.json/en.json/es.jsonfor all labels and error messagesTesting
UserServiceTest— wrong current password returns error; correct current password hashes and stores the new one; password change invalidates other sessions; duplicate email returns conflict@WebMvcTeston the new controller actions — 400 on wrong current password, 409 on duplicate email, 200 on valid change/users/{id}Dependencies
None — but issue #36 (forgot password) and #38 (edit history) depend on the
emailcolumn and display name added here.marcel referenced this issue2026-03-20 19:26:30 +01:00