--- application_helper.rb.orig 2017-07-25 17:50:53.194114410 +0200 +++ application_helper.rb 2017-07-26 14:39:39.959434818 +0200 @@ -760,7 +760,7 @@ title ||= identifier if page.blank? end - if link_project && link_project.wiki && User.current.allowed_to?(:view_wiki_pages, link_project) + if link_project && link_project.wiki # extract anchor anchor = nil if page =~ /^(.+?)\#(.+)$/ @@ -782,7 +782,11 @@ :id => wiki_page_id, :version => nil, :anchor => anchor, :parent => parent) end end - link_to(title.present? ? title.html_safe : h(page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new'))) + if User.current.allowed_to?(:view_wiki_pages, link_project) + link_to(title.present? ? title.html_safe : h(page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new'))) + else + title.present? ? title.html_safe : h(page) + end else # project or wiki doesn't exist all