summaryrefslogtreecommitdiff
path: root/lib/gitlab/backend/grack_auth.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/backend/grack_auth.rb')
-rw-r--r--lib/gitlab/backend/grack_auth.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/backend/grack_auth.rb b/lib/gitlab/backend/grack_auth.rb
index e2349495b57..c629144118c 100644
--- a/lib/gitlab/backend/grack_auth.rb
+++ b/lib/gitlab/backend/grack_auth.rb
@@ -58,7 +58,7 @@ module Grack
end
else
- return unauthorized unless project.public
+ return unauthorized unless project.public?
end
if authorized_git_request?
@@ -80,7 +80,7 @@ module Grack
def authorize_request(service)
case service
when 'git-upload-pack'
- project.public || can?(user, :download_code, project)
+ can?(user, :download_code, project)
when'git-receive-pack'
refs.each do |ref|
action = if project.protected_branch?(ref)