Browse Source

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

pull/4/head
Eugen Rochko 5 years ago
committed by GitHub
parent
commit
654f79d2b1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/controllers/admin/pending_accounts_controller.rb

+ 2
- 2
app/controllers/admin/pending_accounts_controller.rb 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

Loading…
Cancel
Save