Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(user edit): fix user edit not being able to be saved #651

Merged
merged 4 commits into from
Jan 15, 2021

Conversation

ankarhem
Copy link
Contributor

@ankarhem ankarhem commented Jan 14, 2021

The local user commit introduced a bug that made you unable to save edited users

also fixed another error that was on the user edit page

@@ -80,6 +80,7 @@ const UserEdit: React.FC = () => {
permissions: currentPermission,
email: user?.email,
avatar: user?.avatar,
userType: user?.userType,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should pass user type. It shouldn't be editable by the user anyways. We should instead change the user route on the server end to merge the actual editable values being submitted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't the same apply for email and avatar though?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avatar yes, email will be editable for local users. So no.

At some point we could also make avatars editable but not very important.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm ok. I see your point then.

The issue is not that it isn't merging the result I think, but that the User schema lists userType as a required parameter.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yeah. Ok let's get this merged for now and we can refactor it later.

The local user commit introduced a bug that made you unable to save edited users
Didn't supply the needed attributes for either one, so react put an error in the console
@sct sct merged commit b04d00e into sct:develop Jan 15, 2021
@github-actions
Copy link

🎉 This PR is included in version 1.17.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants