X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/dd302f4f2c56d1e9f1a2e39a54670f6f5a9bbd34..35a2d66e1960b00e5ed0cecbe4263cdeedb1ad62:/app/controllers/changesets_controller.rb 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