X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/252b9ef08a0b0b7d34eea83149cb1a8ad7af9e34..c4a192f43692964fbc4c20c67930f16393a18028:/app/controllers/changesets_controller.rb?ds=sidebyside diff --git a/app/controllers/changesets_controller.rb b/app/controllers/changesets_controller.rb index e4fd593d7..80b8aff48 100644 --- a/app/controllers/changesets_controller.rb +++ b/app/controllers/changesets_controller.rb @@ -8,7 +8,10 @@ class ChangesetsController < ApplicationController before_action :authorize_web, :only => [:index, :feed] before_action :set_locale, :only => [:index, :feed] before_action :authorize, :only => [:create, :update, :upload, :close, :subscribe, :unsubscribe] - before_action :require_allow_write_api, :only => [:create, :update, :upload, :close, :subscribe, :unsubscribe] + before_action :api_deny_access_handler, :only => [:create, :update, :upload, :close, :subscribe, :unsubscribe, :expand_bbox] + + authorize_resource + before_action :require_public_data, :only => [:create, :update, :upload, :close, :subscribe, :unsubscribe] before_action :check_api_writable, :only => [:create, :update, :upload, :subscribe, :unsubscribe] before_action :check_api_readable, :except => [:create, :update, :upload, :download, :query, :index, :feed, :subscribe, :unsubscribe] @@ -39,7 +42,7 @@ class ChangesetsController < ApplicationController ## # Return XML giving the basic info about the changeset. Does not # return anything about the nodes, ways and relations in the changeset. - def read + def show changeset = Changeset.find(params[:id]) render :xml => changeset.to_xml(params[:include_discussion].presence).to_s