X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/0f7301b64ff33cec548a1a8196a52da050c3d14e..b8f6dbd403507edd14f04f3151c285e232607360:/app/controllers/trace_controller.rb?ds=sidebyside diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index 0248ad7cd..667f85774 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -9,6 +9,8 @@ class TraceController < ApplicationController before_filter :check_database_writable, :only => [:create, :edit, :delete, :make_public] before_filter :check_api_readable, :only => [:api_details, :api_data] before_filter :check_api_writable, :only => [:api_create] + before_filter :require_allow_read_gpx, :only => [:api_details, :api_data] + before_filter :require_allow_write_gpx, :only => [:api_create] # Counts and selects pages of GPX traces for various criteria (by user, tags, public etc.). # target_user - if set, specifies the user to fetch traces for. if not set will fetch all traces @@ -18,6 +20,7 @@ class TraceController < ApplicationController if target_user.nil? and !display_name.blank? target_user = User.find(:first, :conditions => [ "visible = ? and display_name = ?", true, display_name]) if target_user.nil? + @title = t'trace.no_such_user.title' @not_found_user = display_name render :action => 'no_such_user', :status => :not_found return