Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
bb9f827d
Commit
bb9f827d
authored
Jul 15, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix fetching LFS objects for private CI projects
parent
86f39fec
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
CHANGELOG
CHANGELOG
+1
-0
lib/gitlab/backend/grack_auth.rb
lib/gitlab/backend/grack_auth.rb
+1
-1
spec/requests/lfs_http_spec.rb
spec/requests/lfs_http_spec.rb
+6
-1
No files found.
CHANGELOG
View file @
bb9f827d
...
@@ -18,6 +18,7 @@ v 8.10.0 (unreleased)
...
@@ -18,6 +18,7 @@ v 8.10.0 (unreleased)
- Fix MR-auto-close text added to description. !4836
- Fix MR-auto-close text added to description. !4836
- Fix issue, preventing users w/o push access to sort tags !5105 (redetection)
- Fix issue, preventing users w/o push access to sort tags !5105 (redetection)
- Add Spring EmojiOne updates.
- Add Spring EmojiOne updates.
- Fix fetching LFS objects for private CI projects
- Add syntax for multiline blockquote using `>>>` fence !3954
- Add syntax for multiline blockquote using `>>>` fence !3954
- Fix viewing notification settings when a project is pending deletion
- Fix viewing notification settings when a project is pending deletion
- Fix pagination when sorting by columns with lots of ties (like priority)
- Fix pagination when sorting by columns with lots of ties (like priority)
...
...
lib/gitlab/backend/grack_auth.rb
View file @
bb9f827d
...
@@ -63,7 +63,7 @@ module Grack
...
@@ -63,7 +63,7 @@ module Grack
def
ci_request?
(
login
,
password
)
def
ci_request?
(
login
,
password
)
matched_login
=
/(?<s>^[a-zA-Z]*-ci)-token$/
.
match
(
login
)
matched_login
=
/(?<s>^[a-zA-Z]*-ci)-token$/
.
match
(
login
)
if
project
&&
matched_login
.
present?
&&
git_cmd
==
'git-upload-pack'
if
project
&&
matched_login
.
present?
underscored_service
=
matched_login
[
's'
].
underscore
underscored_service
=
matched_login
[
's'
].
underscore
if
underscored_service
==
'gitlab_ci'
if
underscored_service
==
'gitlab_ci'
...
...
spec/requests/lfs_http_spec.rb
View file @
bb9f827d
...
@@ -98,6 +98,8 @@ describe Gitlab::Lfs::Router do
...
@@ -98,6 +98,8 @@ describe Gitlab::Lfs::Router do
context
'with required headers'
do
context
'with required headers'
do
shared_examples
'responds with a file'
do
shared_examples
'responds with a file'
do
let
(
:sendfile
)
{
'X-Sendfile'
}
it
'responds with status 200'
do
it
'responds with status 200'
do
expect
(
response
).
to
have_http_status
(
200
)
expect
(
response
).
to
have_http_status
(
200
)
end
end
...
@@ -110,7 +112,6 @@ describe Gitlab::Lfs::Router do
...
@@ -110,7 +112,6 @@ describe Gitlab::Lfs::Router do
context
'with user is authorized'
do
context
'with user is authorized'
do
let
(
:authorization
)
{
authorize_user
}
let
(
:authorization
)
{
authorize_user
}
let
(
:sendfile
)
{
'X-Sendfile'
}
context
'and does not have project access'
do
context
'and does not have project access'
do
let
(
:update_permissions
)
do
let
(
:update_permissions
)
do
...
@@ -135,6 +136,10 @@ describe Gitlab::Lfs::Router do
...
@@ -135,6 +136,10 @@ describe Gitlab::Lfs::Router do
context
'when CI is authorized'
do
context
'when CI is authorized'
do
let
(
:authorization
)
{
authorize_ci_project
}
let
(
:authorization
)
{
authorize_ci_project
}
let
(
:update_permissions
)
do
project
.
lfs_objects
<<
lfs_object
end
it_behaves_like
'responds with a file'
it_behaves_like
'responds with a file'
end
end
end
end
...
...
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