Check if the key could really download, feedback:

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7383#note_18518792
This commit is contained in:
Lin Jen-Shin 2016-11-18 04:08:24 +08:00
parent af0242b3d6
commit 0c532dbb24
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ module Gitlab
def download_access_check
if deploy_key
true
deploy_key.has_access_to?(project)
elsif user
user_download_access_check
elsif Guest.can?(:download_code, project)