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

[v3] Revert - External user can't change the name anymore #19

Open
wants to merge 2 commits into
base: test3.3.6_forComparison
Choose a base branch
from
Open
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: 1 addition & 5 deletions app/controllers/api/v1/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,7 @@ def create_user_params
end

def update_user_params
@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
@update_user_params ||= params.require(:user).permit(:name, :password, :avatar, :language, :role_id, :invite_token)
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" readOnly={currentUser.external_account} />
<FormControl field={fields.name} type="text" />
<FormControl field={fields.email} type="email" readOnly />
<FormSelect field={fields.language} variant="dropdown">
{
Expand Down
Loading