summaryrefslogtreecommitdiff
path: root/lib/gitlab/git_access.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-11-16 20:31:08 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-11-16 20:31:23 +0800
commita9765fb47fbbd1e1070434fc06cc76b25a42caa6 (patch)
tree30ffc7e93c5721c6ac7743daf6f705a4566efa98 /lib/gitlab/git_access.rb
parent721478123068c6718ec73c72a7b7d32c00c816df (diff)
downloadgitlab-ce-a9765fb47fbbd1e1070434fc06cc76b25a42caa6.tar.gz
Introduce has_access_to? so that we could reuse it
Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7383#note_18439108
Diffstat (limited to 'lib/gitlab/git_access.rb')
-rw-r--r--lib/gitlab/git_access.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb
index 19bdfc878b1..a7ad944e79e 100644
--- a/lib/gitlab/git_access.rb
+++ b/lib/gitlab/git_access.rb
@@ -161,7 +161,7 @@ module Gitlab
def can_read_project?
if deploy_key
- project.public? || deploy_key.projects.include?(project)
+ project.public? || deploy_key.has_access_to?(project)
elsif user
user_access.can_read_project?
else