From 990dcedc4cbcf176c9427a358bd5e162b19ec27d Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 18 Nov 2008 17:23:40 +0000 Subject: [PATCH] Require the user to be logged in for those methods which make no sense otherwise. --- app/controllers/trace_controller.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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 -- 2.39.5