danielBingham / peerreview

A diamond open access (free to access, free to publish), open source scientific and academic publishing platform.
GNU Affero General Public License v3.0
53 stars 1 forks source link

If you update your profile, it will break changing email #185

Open danielBingham opened 1 year ago

danielBingham commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

Attempting to change your email will fail after you've updated your profile. This is the result of the profile updating return an updated clean user object with out the email and setting that on the currentUser which is supposed to be a unclean user with the email included.

To Reproduce Steps to reproduce the behavior:

  1. Login to a user account.
  2. Update the user's profile details (edit the bio)
  3. Attempt to change the user's email

Actual behavior What actually happened?

The change will fail with a server error.

Expected behavior A clear and concise description of what you expected to happen.

The change will succeed.

danielBingham commented 1 year ago

This seems to have been fixed at some point. I can no longer reproduce it and the patchUser endpoint is returning the complete User object rather than the cleaned up.

danielBingham commented 1 year ago

Recently reproduced this while regression testing.