From 621687bfdf31596af9b7ef8e0996a61afaffce84 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Thu, 16 Apr 2015 13:05:49 -0400 Subject: [PATCH] Fix `user_can_reference_project?` check --- lib/gitlab/markdown/cross_project_reference.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gitlab/markdown/cross_project_reference.rb b/lib/gitlab/markdown/cross_project_reference.rb index c8ba9d1fa46..1ef6436451d 100644 --- a/lib/gitlab/markdown/cross_project_reference.rb +++ b/lib/gitlab/markdown/cross_project_reference.rb @@ -29,7 +29,7 @@ module Gitlab end def user_can_reference_project?(project, user = context[:current_user]) - user && Ability.abilities.allowed?(user, :read_project, project) + Ability.abilities.allowed?(user, :read_project, project) end end end