Commit 0ed8b608 authored by Jaime Martinez's avatar Jaime Martinez

Allow downloading archives using PRIVATE-TOKEN

Related to https://gitlab.com/gitlab-org/gitlab/-/issues/28978 and
https://gitlab.com/gitlab-org/gitlab/-/issues/334944.

Changelog: changed
parent 08e9702a
---
name: allow_archive_as_web_access_format
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64471
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/334944
milestone: '14.1'
type: development
group: group::release
default_enabled: false
......@@ -298,7 +298,7 @@ module Gitlab
when :api
api_request?
when :archive
archive_request? if Feature.enabled?(:allow_archive_as_web_access_format, default_enabled: :yaml)
archive_request?
end
end
......
......@@ -496,18 +496,6 @@ RSpec.describe Gitlab::Auth::AuthFinders do
expect(find_user_from_web_access_token(:archive)).to eq(user)
end
context 'when allow_archive_as_web_access_format feature flag is disabled' do
before do
stub_feature_flags(allow_archive_as_web_access_format: false)
end
it 'returns nil for ARCHIVE requests' do
set_header('SCRIPT_NAME', '/-/archive/main.zip')
expect(find_user_from_web_access_token(:archive)).to be_nil
end
end
context 'for API requests' do
it 'returns the user' do
set_header('SCRIPT_NAME', '/api/endpoint')
......
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