@@ -243,10 +243,13 class ApplicationController < ActionController::Base | |||||
243 | redirect_to :controller => "account", :action => "login", :back_url => url |
|
243 | redirect_to :controller => "account", :action => "login", :back_url => url | |
244 | end |
|
244 | end | |
245 | } |
|
245 | } | |
246 | format.atom { redirect_to :controller => "account", :action => "login", :back_url => url } |
|
246 | format.any(:atom, :pdf, :csv) { | |
|
247 | redirect_to :controller => "account", :action => "login", :back_url => url | |||
|
248 | } | |||
247 | format.xml { head :unauthorized, 'WWW-Authenticate' => 'Basic realm="Redmine API"' } |
|
249 | format.xml { head :unauthorized, 'WWW-Authenticate' => 'Basic realm="Redmine API"' } | |
248 | format.js { head :unauthorized, 'WWW-Authenticate' => 'Basic realm="Redmine API"' } |
|
250 | format.js { head :unauthorized, 'WWW-Authenticate' => 'Basic realm="Redmine API"' } | |
249 | format.json { head :unauthorized, 'WWW-Authenticate' => 'Basic realm="Redmine API"' } |
|
251 | format.json { head :unauthorized, 'WWW-Authenticate' => 'Basic realm="Redmine API"' } | |
|
252 | format.any { head :unauthorized } | |||
250 | end |
|
253 | end | |
251 | return false |
|
254 | return false | |
252 | end |
|
255 | end |
@@ -87,4 +87,11 class ApplicationTest < Redmine::IntegrationTest | |||||
87 | ensure |
|
87 | ensure | |
88 | ActionController::Base.allow_forgery_protection = false |
|
88 | ActionController::Base.allow_forgery_protection = false | |
89 | end |
|
89 | end | |
|
90 | ||||
|
91 | def test_require_login_with_pdf_format_should_not_error | |||
|
92 | with_settings :login_required => '1' do | |||
|
93 | get '/issues/1.pdf' | |||
|
94 | assert_response 302 | |||
|
95 | end | |||
|
96 | end | |||
90 | end |
|
97 | end |
General Comments 0
You need to be logged in to leave comments.
Login now