From 9ddc02cd1477a7b6e03787a815cb465a66128b0b Mon Sep 17 00:00:00 2001 From: Lucas Hiago Date: Fri, 10 Jan 2020 12:45:18 -0300 Subject: [PATCH] Remove password verification (#5304) --- app/controllers/admin/users_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 36ab4f271..fa0d25803 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -13,9 +13,7 @@ module Admin private def user_params - allowed = allowed_params - allowed << %i[password password_confirmation] if params[:user][:password].present? - verify_usernames params.require(:user).permit(allowed) + verify_usernames params.require(:user).permit(allowed_params) end # make sure usernames are not empty, to be able to use the database unique index