From: Tom Hughes Date: Tue, 18 Nov 2008 17:23:40 +0000 (+0000) Subject: Require the user to be logged in for those methods which make no X-Git-Tag: live~8178 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/990dcedc4cbcf176c9427a358bd5e162b19ec27d Require the user to be logged in for those methods which make no sense otherwise. --- diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index 9ed803bae..91ae92b05 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -2,6 +2,7 @@ class TraceController < ApplicationController layout 'site' before_filter :authorize_web + before_filter :require_user, :only => [:mine, :edit, :delete, :make_public] before_filter :authorize, :only => [:api_details, :api_data, :api_create] before_filter :check_database_availability, :except => [:api_details, :api_data, :api_create] before_filter :check_read_availability, :only => [:api_details, :api_data, :api_create] @@ -77,11 +78,7 @@ class TraceController < ApplicationController end def mine - if @user - list(@user, "mine") unless @user.nil? - else - redirect_to :controller => 'user', :action => 'login', :referer => request.request_uri - end + list(@user, "mine") end def view