]> cat aescling's git repositories - mastodon.git/commitdiff
Fix authorization check in domain blocks controller
authorClaire <claire.github-309c@sitedethib.com>
Tue, 5 Jul 2022 09:57:30 +0000 (11:57 +0200)
committeraescling <aescling+gitlab@cat.family>
Mon, 5 Sep 2022 04:27:53 +0000 (00:27 -0400)
app/controllers/admin/domain_blocks_controller.rb

index 48e9781d606603994c1e64379eb7289f20b2e011..32f1f9a5d3a72788aed4a9881630c1af4ddfae99 100644 (file)
@@ -5,6 +5,7 @@ module Admin
     before_action :set_domain_block, only: [:show, :destroy, :edit, :update]
 
     def batch
+      authorize :domain_block, :create?
       @form = Form::DomainBlockBatch.new(form_domain_block_batch_params.merge(current_account: current_account, action: action_from_button))
       @form.save
     rescue ActionController::ParameterMissing