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:
authorRémy Coutable <remy@rymai.me>2016-07-19 18:21:29 +0300
committerRémy Coutable <remy@rymai.me>2016-07-19 18:21:29 +0300
commite953b8afd2efe042c72ec8be2b9ad35ee04f8723 (patch)
tree564ced37db4e5d65d82b85eeaf4be74c5f8d5a19 /lib/gitlab
parent0e9323bd4a61e7125ed90fc60d8072377b6d0c38 (diff)
parent2532ec9edcf9a961c2020c7180c24ec44a8b8308 (diff)
Merge branch 'allow-deploy-key-to-download-public-projects' into 'master'
Allow to pull code with deploy key from public projects ## What does this MR do? With deploy keys you can download any public projects stored in GitLab. ## What are the relevant issue numbers? Fixes: https://gitlab.com/gitlab-org/gitlab-ce/issues/1217 ## Does this MR meet the acceptance criteria? - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5316
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/git_access.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb
index 308f23bc9bc..8e8f39d9cb2 100644
--- a/lib/gitlab/git_access.rb
+++ b/lib/gitlab/git_access.rb
@@ -110,6 +110,7 @@ module Gitlab
def deploy_key_can_read_project?
if deploy_key
+ return true if project.public?
deploy_key.projects.include?(project)
else
false