X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/25e1145c32c34318edab7a5ce0a059034703ccb0..257ecde90d81a23b9cfcd2376ee39374b8fa2e7b:/app/controllers/api_controller.rb?ds=sidebyside diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index edafac7cc..ae1bc8755 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -1,6 +1,8 @@ class ApiController < ApplicationController skip_before_action :verify_authenticity_token + before_action :check_api_readable + private ## @@ -110,6 +112,7 @@ class ApiController < ApplicationController # self.current_user setup by OAuth else report_error t("application.oauth_10a_disabled", :link => t("application.auth_disabled_link")), :forbidden + self.current_user = nil end else username, passwd = auth_data # parse from headers