Commit 0db9ffcb authored by Shinya Maeda's avatar Shinya Maeda

Merge branch '334944-enable-allow_archive_as_web_access_format-by-default' into 'master'

Allow downloading archives using PRIVATE-TOKEN [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!67470
parents 664bd757 0ed8b608
---
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 ...@@ -298,7 +298,7 @@ module Gitlab
when :api when :api
api_request? api_request?
when :archive when :archive
archive_request? if Feature.enabled?(:allow_archive_as_web_access_format, default_enabled: :yaml) archive_request?
end end
end end
......
...@@ -496,18 +496,6 @@ RSpec.describe Gitlab::Auth::AuthFinders do ...@@ -496,18 +496,6 @@ RSpec.describe Gitlab::Auth::AuthFinders do
expect(find_user_from_web_access_token(:archive)).to eq(user) expect(find_user_from_web_access_token(:archive)).to eq(user)
end 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 context 'for API requests' do
it 'returns the user' do it 'returns the user' do
set_header('SCRIPT_NAME', '/api/endpoint') 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