Project

General

Profile

Feature #26530 ยป wiki-links-patch.diff

Michael Gerz, 2017-07-27 17:38

View differences:

application_helper.rb 2017-07-26 14:39:39.959434818 +0200
760 760
          title ||= identifier if page.blank?
761 761
        end
762 762

  
763
        if link_project && link_project.wiki && User.current.allowed_to?(:view_wiki_pages, link_project)
763
        if link_project && link_project.wiki
764 764
          # extract anchor
765 765
          anchor = nil
766 766
          if page =~ /^(.+?)\#(.+)$/
......
782 782
               :id => wiki_page_id, :version => nil, :anchor => anchor, :parent => parent)
783 783
            end
784 784
          end
785
          link_to(title.present? ? title.html_safe : h(page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new')))
785
          if User.current.allowed_to?(:view_wiki_pages, link_project)
786
            link_to(title.present? ? title.html_safe : h(page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new')))
787
          else
788
            title.present? ? title.html_safe : h(page)
789
          end
786 790
        else
787 791
          # project or wiki doesn't exist
788 792
          all
    (1-1/1)