Closed tlvu closed 3 years ago
This looks like a side effect of an invalid user-name before #84 was introduced. I don't plan to modify the UI to address this since it should not be allowed in the first place. Maybe it is possible via the API since the PATCH request takes the parameters with an explicit string in the request body?
Closing as invalid name should not be possible anymore. Such cases should be modified manually in db.
Such cases should be modified manually in db.
Documenting for other users if needed:
# POSTGRES_MAGPIE_USERNAME is from env.local
$ echo "update users set user_name = '$FIXED_USERNAME' where email = '$USER_EMAIL'" | docker exec -i postgres-magpie psql -U $POSTGRES_MAGPIE_USERNAME magpiedb
UPDATE 1
Describe the bug From https://github.com/bird-house/birdhouse-deploy/pull/182#issuecomment-884376408 I found out one of the user with duplicate email has trailing space in its username so I was unable to edit the user via UI to change its email.
And there was no way to edit the username to remove the trailing space.
Error in
docker logs magpie
, notice%20%20
at the end of the username:To Reproduce Steps to reproduce the behavior:
https://lvupavicsdev.ouranos.ca/magpie/ui/users/hnils%20%20/default
in order to edit the userHTTPUnprocessableEntity: Unable to process the contained instructions
Expected behavior A recommended way out of this, either to be able to edit that user with trailing space or to be able to rename the username to remove the trailing space.