Skip to content
Snippets Groups Projects
Commit bb9f827d authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

Fix fetching LFS objects for private CI projects

parent 86f39fec
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -18,6 +18,7 @@ v 8.10.0 (unreleased)
- Fix MR-auto-close text added to description. !4836
- Fix issue, preventing users w/o push access to sort tags !5105 (redetection)
- Add Spring EmojiOne updates.
- Fix fetching LFS objects for private CI projects
- Add syntax for multiline blockquote using `>>>` fence !3954
- Fix viewing notification settings when a project is pending deletion
- Fix pagination when sorting by columns with lots of ties (like priority)
Loading
Loading
Loading
Loading
@@ -63,7 +63,7 @@ module Grack
def ci_request?(login, password)
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
 
if underscored_service == 'gitlab_ci'
Loading
Loading
Loading
Loading
@@ -98,6 +98,8 @@ describe Gitlab::Lfs::Router do
 
context 'with required headers' do
shared_examples 'responds with a file' do
let(:sendfile) { 'X-Sendfile' }
it 'responds with status 200' do
expect(response).to have_http_status(200)
end
Loading
Loading
@@ -110,7 +112,6 @@ describe Gitlab::Lfs::Router do
 
context 'with user is authorized' do
let(:authorization) { authorize_user }
let(:sendfile) { 'X-Sendfile' }
 
context 'and does not have project access' do
let(:update_permissions) do
Loading
Loading
@@ -135,6 +136,10 @@ describe Gitlab::Lfs::Router do
context 'when CI is authorized' do
let(:authorization) { authorize_ci_project }
 
let(:update_permissions) do
project.lfs_objects << lfs_object
end
it_behaves_like 'responds with a file'
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment