mirror of
https://github.com/redmine/redmine.git
synced 2025-11-10 15:26:03 +01:00
Merged r16283 (#23793).
git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@16300 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -693,7 +693,7 @@ module ApplicationHelper
|
|||||||
title ||= identifier if page.blank?
|
title ||= identifier if page.blank?
|
||||||
end
|
end
|
||||||
|
|
||||||
if link_project && link_project.wiki
|
if link_project && link_project.wiki && User.current.allowed_to?(:view_wiki_pages, link_project)
|
||||||
# extract anchor
|
# extract anchor
|
||||||
anchor = nil
|
anchor = nil
|
||||||
if page =~ /^(.+?)\#(.+)$/
|
if page =~ /^(.+?)\#(.+)$/
|
||||||
|
|||||||
5
test/fixtures/wikis.yml
vendored
5
test/fixtures/wikis.yml
vendored
@@ -9,3 +9,8 @@ wikis_002:
|
|||||||
start_page: Start page
|
start_page: Start page
|
||||||
project_id: 2
|
project_id: 2
|
||||||
id: 2
|
id: 2
|
||||||
|
wikis_005:
|
||||||
|
status: 1
|
||||||
|
start_page: Wiki
|
||||||
|
project_id: 5
|
||||||
|
id: 5
|
||||||
|
|||||||
@@ -665,6 +665,7 @@ RAW
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_wiki_links
|
def test_wiki_links
|
||||||
|
User.current = User.find_by_login('jsmith')
|
||||||
russian_eacape = CGI.escape(@russian_test)
|
russian_eacape = CGI.escape(@russian_test)
|
||||||
to_test = {
|
to_test = {
|
||||||
'[[CookBook documentation]]' =>
|
'[[CookBook documentation]]' =>
|
||||||
@@ -746,6 +747,9 @@ RAW
|
|||||||
# project does not exist
|
# project does not exist
|
||||||
'[[unknowproject:Start]]' => '[[unknowproject:Start]]',
|
'[[unknowproject:Start]]' => '[[unknowproject:Start]]',
|
||||||
'[[unknowproject:Start|Page title]]' => '[[unknowproject:Start|Page title]]',
|
'[[unknowproject:Start|Page title]]' => '[[unknowproject:Start|Page title]]',
|
||||||
|
# missing permission to view wiki in project
|
||||||
|
'[[private-child:]]' => '[[private-child:]]',
|
||||||
|
'[[private-child:Wiki]]' => '[[private-child:Wiki]]',
|
||||||
}
|
}
|
||||||
@project = Project.find(1)
|
@project = Project.find(1)
|
||||||
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
|
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
|
||||||
|
|||||||
Reference in New Issue
Block a user