Fixed: new gantt chart discloses all private projects names (#6276).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4425 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2010-11-21 14:57:53 +00:00
parent 7087a53f27
commit dfc76ce642
2 changed files with 17 additions and 5 deletions

View File

@@ -49,6 +49,18 @@ class GanttsControllerTest < ActionController::TestCase
assert_nil assigns(:gantt).project
end
should "not disclose private projects" do
get :show
assert_response :success
assert_template 'show.html.erb'
assert_tag 'a', :content => /eCookbook/
# Root private project
assert_no_tag 'a', {:content => /OnlineStore/}
# Private children of a public project
assert_no_tag 'a', :content => /Private child of eCookbook/
end
should "export to pdf" do
get :show, :project_id => 1, :format => 'pdf'
assert_response :success