summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gitlab/git_access.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb
index d5690f870e9..3f674532488 100644
--- a/lib/gitlab/git_access.rb
+++ b/lib/gitlab/git_access.rb
@@ -48,11 +48,9 @@ module Gitlab
deploy_key.has_access_to?(project)
elsif user
user_download_access_check
- elsif Guest.can?(:download_code, project)
- true
- else
- raise UnauthorizedError, ERROR_MESSAGES[:download]
- end
+ end ||
+ Guest.can?(:download_code, project) ||
+ raise(UnauthorizedError, ERROR_MESSAGES[:download])
end
def push_access_check(changes)