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:
Diffstat (limited to 'app/controllers/repositories/lfs_api_controller.rb')
-rw-r--r--app/controllers/repositories/lfs_api_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/repositories/lfs_api_controller.rb b/app/controllers/repositories/lfs_api_controller.rb
index 32119ddf89e..da243a0301e 100644
--- a/app/controllers/repositories/lfs_api_controller.rb
+++ b/app/controllers/repositories/lfs_api_controller.rb
@@ -64,11 +64,13 @@ module Repositories
.for_oids(objects_oids)
.index_by(&:oid)
+ guest_can_download = Guest.can?(:download_code, project)
+
objects.each do |object|
if lfs_object = existing_oids[object[:oid]]
object[:actions] = download_actions(object, lfs_object)
- if Guest.can?(:download_code, project)
+ if guest_can_download
object[:authenticated] = true
end
else