@@ -243,10 +243,13 class ApplicationController < ActionController::Base | |||
|
243 | 243 | redirect_to :controller => "account", :action => "login", :back_url => url |
|
244 | 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 | 249 | format.xml { head :unauthorized, 'WWW-Authenticate' => 'Basic realm="Redmine API"' } |
|
248 | 250 | format.js { head :unauthorized, 'WWW-Authenticate' => 'Basic realm="Redmine API"' } |
|
249 | 251 | format.json { head :unauthorized, 'WWW-Authenticate' => 'Basic realm="Redmine API"' } |
|
252 | format.any { head :unauthorized } | |
|
250 | 253 | end |
|
251 | 254 | return false |
|
252 | 255 | end |
@@ -87,4 +87,11 class ApplicationTest < Redmine::IntegrationTest | |||
|
87 | 87 | ensure |
|
88 | 88 | ActionController::Base.allow_forgery_protection = false |
|
89 | 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 | 97 | end |
General Comments 0
You need to be logged in to leave comments.
Login now