X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/5e407dfb34f47e6fbbbf3c11c1a8318256abb5cd..e7f943c715d7104fd4f22fe59a79a5d52e71a7c4:/app/controllers/old_controller.rb diff --git a/app/controllers/old_controller.rb b/app/controllers/old_controller.rb index 4f01b1e2a..74fe0883b 100644 --- a/app/controllers/old_controller.rb +++ b/app/controllers/old_controller.rb @@ -6,9 +6,11 @@ class OldController < ApplicationController skip_before_action :verify_authenticity_token before_action :setup_user_auth, :only => [:history, :version] + before_action :api_deny_access_handler before_action :authorize, :only => [:redact] - before_action :authorize_moderator, :only => [:redact] - before_action :require_allow_write_api, :only => [:redact] + + authorize_resource + before_action :check_api_readable before_action :check_api_writable, :only => [:redact] around_action :api_call_handle_error, :api_call_timeout