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

External users can no longer change their names, similar to emails #5840

Merged
merged 4 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/controllers/api/v1/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ def create_user_params
end

def update_user_params
@update_user_params ||= params.require(:user).permit(:name, :password, :avatar, :language, :role_id, :invite_token)
@update_user_params ||= if external_auth?
params.require(:user).permit(:password, :avatar, :language, :role_id, :invite_token)
else
params.require(:user).permit(:name, :password, :avatar, :language, :role_id, :invite_token)
end
end

def change_password_params
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function UpdateUserForm({ user }) {

return (
<Form methods={methods} onSubmit={updateUserAPI.mutate}>
<FormControl field={fields.name} type="text" />
alihadimazeh marked this conversation as resolved.
Show resolved Hide resolved
<FormControl field={fields.name} type="text" readOnly={currentUser.external_account} />
<FormControl field={fields.email} type="email" readOnly />
<FormSelect field={fields.language} variant="dropdown">
{
Expand Down
Loading