Commit 1453eb07 authored by Eugenia Grieff's avatar Eugenia Grieff

Remove import_requirements_csv flag

- This FF is no longer needed
parent 67b670a8
---
name: import_requirements_csv
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48060
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/284846
milestone: '13.7'
type: development
group: group::product planning
default_enabled: true
......@@ -7,9 +7,6 @@ class Projects::RequirementsManagement::RequirementsController < Projects::Appli
before_action :authorize_read_requirement!
before_action :authorize_import_access!, only: [:import_csv, :authorize]
before_action do
push_frontend_feature_flag(:import_requirements_csv, project, default_enabled: true)
end
feature_category :requirements_management
......@@ -37,8 +34,6 @@ class Projects::RequirementsManagement::RequirementsController < Projects::Appli
private
def authorize_import_access!
render_404 unless Feature.enabled?(:import_requirements_csv, project, default_enabled: true)
return if can?(current_user, :import_requirements, project)
if current_user || action_name == 'authorize'
......
......@@ -24,10 +24,6 @@ RSpec.describe Projects::RequirementsManagement::RequirementsController do
subject { upload_file(file, workhorse_headers, params) }
before do
stub_feature_flags(import_requirements_csv: true)
end
context 'unauthorized' do
context 'when user is not signed in' do
it_behaves_like 'response with 404 status'
......@@ -102,14 +98,6 @@ RSpec.describe Projects::RequirementsManagement::RequirementsController do
end
end
context 'when requirements import FF is disabled' do
before do
stub_feature_flags(import_requirements_csv: false)
end
it_behaves_like 'response with 404 status'
end
def upload_file(file, headers = {}, params = {})
workhorse_finalize(
import_csv_project_requirements_management_requirements_path(project),
......@@ -128,34 +116,33 @@ RSpec.describe Projects::RequirementsManagement::RequirementsController do
headers: workhorse_headers
end
context 'with an authorized user' do
before do
login_as(user)
stub_licensed_features(requirements: true)
end
context 'with authorized user' do
before do
project.add_reporter(user)
end
context 'when feature is available' do
before do
stub_licensed_features(requirements: true)
stub_feature_flags(import_requirements_csv: true)
end
context 'when requirements feature is enabled' do
it_behaves_like 'handle uploads authorize request' do
let(:uploader_class) { FileUploader }
let(:maximum_size) { Gitlab::CurrentSettings.max_attachment_size.megabytes }
end
end
context 'when feature is disabled' do
context 'when requirements feature is disabled' do
before do
stub_licensed_features(requirements: true)
stub_feature_flags(import_requirements_csv: true)
stub_licensed_features(requirements: false)
end
it_behaves_like 'response with 404 status'
end
end
context 'with an authorized user' do
context 'with unauthorized user' do
it_behaves_like 'response with 404 status'
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