##// END OF EJS Templates
Merged r16283 (#23793)....
Jean-Philippe Lang -
r15918:ac7ebdc34a23
parent child
Show More
@@ -693,7 +693,7 module ApplicationHelper
693 693 title ||= identifier if page.blank?
694 694 end
695 695
696 if link_project && link_project.wiki
696 if link_project && link_project.wiki && User.current.allowed_to?(:view_wiki_pages, link_project)
697 697 # extract anchor
698 698 anchor = nil
699 699 if page =~ /^(.+?)\#(.+)$/
@@ -9,3 +9,8 wikis_002:
9 9 start_page: Start page
10 10 project_id: 2
11 11 id: 2
12 wikis_005:
13 status: 1
14 start_page: Wiki
15 project_id: 5
16 id: 5
@@ -665,6 +665,7 RAW
665 665 end
666 666
667 667 def test_wiki_links
668 User.current = User.find_by_login('jsmith')
668 669 russian_eacape = CGI.escape(@russian_test)
669 670 to_test = {
670 671 '[[CookBook documentation]]' =>
@@ -746,6 +747,9 RAW
746 747 # project does not exist
747 748 '[[unknowproject:Start]]' => '[[unknowproject:Start]]',
748 749 '[[unknowproject:Start|Page title]]' => '[[unknowproject:Start|Page title]]',
750 # missing permission to view wiki in project
751 '[[private-child:]]' => '[[private-child:]]',
752 '[[private-child:Wiki]]' => '[[private-child:Wiki]]',
749 753 }
750 754 @project = Project.find(1)
751 755 to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
General Comments 0
You need to be logged in to leave comments. Login now