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

這個提交存在於:
Eugen Rochko 2019-04-09 07:19:52 +02:00 提交者 GitHub
父節點 c03f926cf3
當前提交 654f79d2b1
資料庫中找不到此簽署所對應的金鑰
GPG 金鑰 ID: 4AEE18F83AFDEB23

檢視檔案

@ -18,12 +18,12 @@ module Admin
end end
def approve_all 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) redirect_to admin_pending_accounts_path(current_params)
end end
def reject_all 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) redirect_to admin_pending_accounts_path(current_params)
end end