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