As an admin I want to create and edit full user profiles so that users start with their information pre-filled #37
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
The admin page currently manages users in a compact table row (login, password field, group selector, delete). With the profile fields added in #35 (first name, last name, birth date, email, contact), there is no room to add those inline. The admin should be able to pre-fill this data at account creation time so the user does not have to enter it themselves.
This requires a light overhaul of the admin user management section — moving from inline table editing to a proper per-user edit view.
Desired behaviour
User list (overview, replaces the current table):
User create / edit form (new dedicated view or side panel):
UI options to consider
Two patterns are reasonable — pick one during implementation:
/admin/users/[id]/editand/admin/users/new— full page, easy to link to, clean URLGiven the number of fields (10+), a dedicated route is likely cleaner.
Implementation notes
Backend — the profile fields are already added by #35. Only the admin-override password change needs a separate code path:
PUT /api/users/{id}(already exists or extend it) should allow an admin (ADMIN_USERpermission) to update profile fields and optionally set a new password without supplying a current passwordPOST /api/users/me/password(from #35) still requires the current password — this is the self-service pathFrontend
src/routes/admin/+page.svelte— replace the inline user table with the new list + edit-view patternsrc/routes/admin/users/new/andsrc/routes/admin/users/[id]/(or modal equivalent)Testing
@WebMvcTest— admin can update another user's profile fields; admin can set a new password without current password; non-admin gets 403Dependencies
/api/users/meendpoints exist; this issue extends the admin path to the same data