about summary refs log tree commit diff
path: root/app/controllers/api/v1/admin/account_actions_controller.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-01-19 14:22:59 +0100
committerGitHub <noreply@github.com>2022-01-19 14:22:59 +0100
commitb209e919bddb4bb72bb4f8589f4b15654f22ef53 (patch)
treeccd980d2d701c03f9c16358908f20560f2d5be2c /app/controllers/api/v1/admin/account_actions_controller.rb
parentf6acc039ec95c6d1c8cc2e2955f2af31d27e928c (diff)
parentc42938aed4677f52207bbb6389c7edc2772a6f7a (diff)
Merge pull request #1662 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/api/v1/admin/account_actions_controller.rb')
-rw-r--r--app/controllers/api/v1/admin/account_actions_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/api/v1/admin/account_actions_controller.rb b/app/controllers/api/v1/admin/account_actions_controller.rb
index 29c9b7107..15af50822 100644
--- a/app/controllers/api/v1/admin/account_actions_controller.rb
+++ b/app/controllers/api/v1/admin/account_actions_controller.rb
@@ -1,7 +1,9 @@
 # frozen_string_literal: true
 
 class Api::V1::Admin::AccountActionsController < Api::BaseController
-  before_action -> { doorkeeper_authorize! :'admin:write', :'admin:write:accounts' }
+  protect_from_forgery with: :exception
+
+  before_action -> { authorize_if_got_token! :'admin:write', :'admin:write:accounts' }
   before_action :require_staff!
   before_action :set_account