-
-
Notifications
You must be signed in to change notification settings - Fork 446
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
Conversation
src/components/UserEdit/index.tsx
Outdated
@@ -80,6 +80,7 @@ const UserEdit: React.FC = () => { | |||
permissions: currentPermission, | |||
email: user?.email, | |||
avatar: user?.avatar, | |||
userType: user?.userType, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
0c04b1c
to
49e121d
Compare
🎉 This PR is included in version 1.17.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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