Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-10-13 14:36:47 +0300
committerDouwe Maan <douwe@gitlab.com>2015-10-13 14:36:47 +0300
commit5dd77358f6293249494bf390140843f63dfd220a (patch)
tree015378225c7ca1c293f4f3565313eab4298d90bb /lib/gitlab/markdown
parent9d066bc9417b06c8eaa8a7e5e73b153093102bbc (diff)
Pass project to RedactorFilter
Diffstat (limited to 'lib/gitlab/markdown')
-rw-r--r--lib/gitlab/markdown/reference_filter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/markdown/reference_filter.rb b/lib/gitlab/markdown/reference_filter.rb
index c7d4b15d458..0ea966c744b 100644
--- a/lib/gitlab/markdown/reference_filter.rb
+++ b/lib/gitlab/markdown/reference_filter.rb
@@ -15,7 +15,7 @@ module Gitlab
def self.user_can_reference?(user, node, context)
if node.has_attribute?('data-project')
project_id = node.attr('data-project').to_i
- return true if project_id == context[:project].id
+ return true if project_id == context[:project].try(:id)
project = Project.find(project_id) rescue nil
Ability.abilities.allowed?(user, :read_project, project)