diff --git a/app/controllers/api/v1/users_controller.rb b/app/controllers/api/v1/users_controller.rb index 8a19fe57e5..d28c0834a3 100644 --- a/app/controllers/api/v1/users_controller.rb +++ b/app/controllers/api/v1/users_controller.rb @@ -166,8 +166,11 @@ def create_user_params end def update_user_params - external_auth? ? @update_user_params ||= params.require(:user).permit(:password, :avatar, :language, :role_id, :invite_token) - : 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