##// END OF EJS Templates
Merged r3050 from trunk....
Eric Davis -
r2938:ce41d4f9b04b
parent child
Show More
@@ -82,7 +82,13 class ApplicationController < ActionController::Base
82 82
83 83 def require_login
84 84 if !User.current.logged?
85 redirect_to :controller => "account", :action => "login", :back_url => url_for(params)
85 # Extract only the basic url parameters on non-GET requests
86 if request.get?
87 url = url_for(params)
88 else
89 url = url_for(:controller => params[:controller], :action => params[:action], :id => params[:id], :project_id => params[:project_id])
90 end
91 redirect_to :controller => "account", :action => "login", :back_url => url
86 92 return false
87 93 end
88 94 true
@@ -10,6 +10,7 http://www.redmine.org/
10 10 * Fixed: pre tags containing "<pre*"
11 11 * Fixed: First date of the date range not included in the time report with SQLite
12 12 * Fixed: Password field not styled correctly on alternative stylesheet
13 * Fixed: Error when sumbitting a POST request that requires a login
13 14
14 15 == 2009-11-04 v0.8.6
15 16
@@ -63,4 +63,10 class AdminTest < ActionController::IntegrationTest
63 63 assert_response :success
64 64 assert_template "admin/projects"
65 65 end
66
67 def test_add_a_user_as_an_anonymous_user_should_fail
68 post '/users/add', :user => { :login => 'psmith', :firstname => 'Paul'}, :password => "psmith09", :password_confirmation => "psmith09"
69 assert_response :redirect
70 assert_redirected_to "/login?back_url=http%3A%2F%2Fwww.example.com%2Fusers%2Fadd"
71 end
66 72 end
General Comments 0
You need to be logged in to leave comments. Login now