X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4470cb88e0556041452719a3b4d7396cb3e3ec4a..0cd18eb02f853bfa93673f046b793bd53ac5aa68:/app/controllers/changesets_controller.rb diff --git a/app/controllers/changesets_controller.rb b/app/controllers/changesets_controller.rb index aa9d81343..d5ac49d4c 100644 --- a/app/controllers/changesets_controller.rb +++ b/app/controllers/changesets_controller.rb @@ -7,9 +7,8 @@ class ChangesetsController < ApplicationController before_action :authorize_web before_action :set_locale - before_action -> { check_database_readable(:need_api => true) }, :only => [:index, :feed, :show] + before_action -> { check_database_readable(:need_api => true) } before_action :require_oauth, :only => :show - before_action :check_database_writable, :only => [:subscribe, :unsubscribe] authorize_resource @@ -107,34 +106,6 @@ class ChangesetsController < ApplicationController render :template => "browse/not_found", :status => :not_found, :layout => map_layout end - ## - # subscribe to a changeset - def subscribe - @changeset = Changeset.find(params[:id]) - - if request.post? - @changeset.subscribe(current_user) unless @changeset.subscribed?(current_user) - - redirect_to changeset_path(@changeset) - end - rescue ActiveRecord::RecordNotFound - render :action => "no_such_entry", :status => :not_found - end - - ## - # unsubscribe from a changeset - def unsubscribe - @changeset = Changeset.find(params[:id]) - - if request.post? - @changeset.unsubscribe(current_user) - - redirect_to changeset_path(@changeset) - end - rescue ActiveRecord::RecordNotFound - render :action => "no_such_entry", :status => :not_found - end - private #------------------------------------------------------------