diff options
author | Robert Speicher <robert@gitlab.com> | 2016-05-10 00:29:17 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-05-10 00:29:17 +0000 |
commit | 3dc64764ad4c004f1b72aa4e80f0095e7a9a6571 (patch) | |
tree | 3cf013660e2553f5572daec577c80ddc415d60f0 | |
parent | ae25c19ee5dcfae8ea977b2014657ecc6c3eaf3d (diff) | |
parent | bf0fd3ea1bcbf0245c973411d8e5b28a15ef206f (diff) | |
download | gitlab-ce-3dc64764ad4c004f1b72aa4e80f0095e7a9a6571.tar.gz |
Merge branch 'fix-link-to-redmine-issues' into 'master'
Allow Redmine issue references to work as intended
Closes #14527 and #14894
See merge request !4048
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | lib/banzai/filter/issue_reference_filter.rb | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG index 63077523aaa..1c6e24bc10f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -40,6 +40,7 @@ v 8.8.0 (unreleased) v 8.7.4 - Fix always showing build notification message when switching between merge requests - Fix links on wiki pages for relative url setups. !4026 (Artem Sidorenko) + - Links for Redmine issue references are generated correctly again (Benedikt Huss) v 8.7.3 - Emails, Gitlab::Email::Message, Gitlab::Diff, and Premailer::Adapter::Nokogiri are now instrumented diff --git a/lib/banzai/filter/issue_reference_filter.rb b/lib/banzai/filter/issue_reference_filter.rb index 2732e0b5145..59c5e89c546 100644 --- a/lib/banzai/filter/issue_reference_filter.rb +++ b/lib/banzai/filter/issue_reference_filter.rb @@ -10,6 +10,9 @@ module Banzai end def self.user_can_see_reference?(user, node, context) + # It is not possible to check access rights for external issue trackers + return true if context[:project].try(:external_issue_tracker) + issue = Issue.find(node.attr('data-issue')) rescue nil Ability.abilities.allowed?(user, :read_issue, issue) end |