BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1a1381a4
Commit
1a1381a4
authored
Feb 08, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lfs-noauth-public-repo' into 'master'
lfs: do not require auth for public repositories Closes #23360 See merge request !8824
parents
bbb7fbcd
5c20e50f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
lfs_api_controller.rb
app/controllers/projects/lfs_api_controller.rb
+4
-0
lfs-noauth-public-repo.yml
changelogs/unreleased/lfs-noauth-public-repo.yml
+4
-0
lfs_http_spec.rb
spec/requests/lfs_http_spec.rb
+1
-0
No files found.
app/controllers/projects/lfs_api_controller.rb
View file @
1a1381a4
...
...
@@ -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
,
...
...
changelogs/unreleased/lfs-noauth-public-repo.yml
0 → 100644
View file @
1a1381a4
---
title
:
Support unauthenticated LFS object downloads for public projects
merge_request
:
8824
author
:
Ben Boeckel
spec/requests/lfs_http_spec.rb
View file @
1a1381a4
...
...
@@ -600,6 +600,7 @@ describe 'Git LFS API and storage' do
expect
(
json_response
).
to
eq
(
'objects'
=>
[
{
'oid'
=>
sample_oid
,
'size'
=>
sample_size
,
'authenticated'
=>
true
,
'actions'
=>
{
'download'
=>
{
'href'
=>
"
#{
project
.
http_url_to_repo
}
/gitlab-lfs/objects/
#{
sample_oid
}
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment