Commit bb9f827d authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix fetching LFS objects for private CI projects

parent 86f39fec
......@@ -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)
......
......@@ -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'
......
......@@ -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
......@@ -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
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment