User settings form
https://redmine.teklia.com/issues/7318
To help support the case where users can register without any password through the API, we need to expose the existing abilities of the PartialUpdateUser
API endpoint in the frontend.
The Details tab of the user profile page (/user/profile/
) should now be a form, just like in the project information page. The email is read-only, but the display name and password are editable.
The API token is hidden by default, with a button to display it or maybe just copy it the clipboard without displaying it at all. That way, it is not accidentally leaked if someone opens the profile page while sharing their screen somewhere.
There are two password fields, to require the user to confirm the password, just like in the current password reset page. To allow an update to happen, either the display name field must have been changed, or the two password fields must be set to the same password. It is possible to only change your display name without having to type in any new password!
Saving the changes calls a new auth/update
method, which calls PartialUpdateUser
then calls the updateUser
and updateFeatures
mutation to save the returned response.
HTTP 400 errors for both fields should be handled, especially for the password which has various validation rules. The existing registration page shows how the errors can be handled, including the case where the two password fields are filled in but do not match.