diff options
author | Rémy Coutable <remy@rymai.me> | 2017-02-08 13:15:11 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-02-08 13:15:11 +0300 |
commit | 1a1381a47737886aad4c74b65526f101b9ef320a (patch) | |
tree | 35bc58350e8dfaac63e621a4ebbba0f3ccd560b1 /app | |
parent | bbb7fbcd02c9d9a8a6d6ca44d7ce668b80962c21 (diff) | |
parent | 5c20e50f46c6cf7634a20027c5ae257a6c25d995 (diff) |
Merge branch 'lfs-noauth-public-repo' into 'master'
lfs: do not require auth for public repositories
Closes #23360
See merge request !8824
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/lfs_api_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/projects/lfs_api_controller.rb b/app/controllers/projects/lfs_api_controller.rb index 440259b643c..8a5a645ed0e 100644 --- a/app/controllers/projects/lfs_api_controller.rb +++ b/app/controllers/projects/lfs_api_controller.rb @@ -48,6 +48,10 @@ class Projects::LfsApiController < Projects::GitHttpClientController objects.each do |object| if existing_oids.include?(object[:oid]) object[:actions] = download_actions(object) + + if Guest.can?(:download_code, project) + object[:authenticated] = true + end else object[:error] = { code: 404, |