]> cat aescling's git repositories - mastodon.git/commitdiff
Fix permission denied bug on approve all/reject all pending accounts (#10519)
authorEugen Rochko <eugen@zeonfederated.com>
Tue, 9 Apr 2019 05:19:52 +0000 (07:19 +0200)
committerGitHub <noreply@github.com>
Tue, 9 Apr 2019 05:19:52 +0000 (07:19 +0200)
app/controllers/admin/pending_accounts_controller.rb

index f145108b3402636c2b2e74f3093a55cd06ecef30..2ea7785fc095f815367c0d6f7f2db1a90b20b489 100644 (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