Fix permission denied bug on approve all/reject all pending accounts (#10519)

lolsob-rspec
Eugen Rochko 2019-04-09 07:19:52 +02:00 committed by GitHub
parent ae6c9b4f10
commit 55f25ceda3
1 changed files with 2 additions and 2 deletions

View File

@ -18,12 +18,12 @@ module Admin
end
def approve_all
Form::AccountBatch.new(account_ids: User.pending.pluck(:account_id), action: 'approve').save
Form::AccountBatch.new(current_account: current_account, account_ids: User.pending.pluck(:account_id), action: 'approve').save
redirect_to admin_pending_accounts_path(current_params)
end
def reject_all
Form::AccountBatch.new(account_ids: User.pending.pluck(:account_id), action: 'reject').save
Form::AccountBatch.new(current_account: current_account, account_ids: User.pending.pluck(:account_id), action: 'reject').save
redirect_to admin_pending_accounts_path(current_params)
end