X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/20e5f756be74c8adf31d7ec3a6406a2b4bdb22c1..d5356eb7d87b97d9562a035cf4ea70adbc5bef1b:/app/controllers/site_controller.rb?ds=inline diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 72fe3b241..0e26185a1 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -5,6 +5,7 @@ class SiteController < ApplicationController before_filter :authorize_web before_filter :set_locale before_filter :require_user, :only => [:edit] + before_filter :require_oauth, :only => [:index] def index unless STATUS == :database_readonly or STATUS == :database_offline @@ -51,7 +52,7 @@ class SiteController < ApplicationController @lat = bbox.centre_lat @lon = bbox.centre_lon elsif params[:gpx] - trace = Trace.find(params[:gpx]) + trace = Trace.visible_to(@user).find(params[:gpx]) @lat = trace.latitude @lon = trace.longitude end @@ -64,4 +65,8 @@ class SiteController < ApplicationController def preview render :text => RichText.new(params[:format], params[:text]).to_html end + + def id + render "id", :layout => false + end end