Commit dae85d23 authored by Robert Speicher's avatar Robert Speicher

Merge branch '284846-remove-import-requirements-csv-ff' into 'master'

Remove import_requirements_csv feature flag

See merge request gitlab-org/gitlab!52906
parents 189af37c 1453eb07
---
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 ...@@ -7,9 +7,6 @@ class Projects::RequirementsManagement::RequirementsController < Projects::Appli
before_action :authorize_read_requirement! before_action :authorize_read_requirement!
before_action :authorize_import_access!, only: [:import_csv, :authorize] 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 feature_category :requirements_management
...@@ -37,8 +34,6 @@ class Projects::RequirementsManagement::RequirementsController < Projects::Appli ...@@ -37,8 +34,6 @@ class Projects::RequirementsManagement::RequirementsController < Projects::Appli
private private
def authorize_import_access! def authorize_import_access!
render_404 unless Feature.enabled?(:import_requirements_csv, project, default_enabled: true)
return if can?(current_user, :import_requirements, project) return if can?(current_user, :import_requirements, project)
if current_user || action_name == 'authorize' if current_user || action_name == 'authorize'
......
...@@ -24,10 +24,6 @@ RSpec.describe Projects::RequirementsManagement::RequirementsController do ...@@ -24,10 +24,6 @@ RSpec.describe Projects::RequirementsManagement::RequirementsController do
subject { upload_file(file, workhorse_headers, params) } subject { upload_file(file, workhorse_headers, params) }
before do
stub_feature_flags(import_requirements_csv: true)
end
context 'unauthorized' do context 'unauthorized' do
context 'when user is not signed in' do context 'when user is not signed in' do
it_behaves_like 'response with 404 status' it_behaves_like 'response with 404 status'
...@@ -102,14 +98,6 @@ RSpec.describe Projects::RequirementsManagement::RequirementsController do ...@@ -102,14 +98,6 @@ RSpec.describe Projects::RequirementsManagement::RequirementsController do
end end
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 = {}) def upload_file(file, headers = {}, params = {})
workhorse_finalize( workhorse_finalize(
import_csv_project_requirements_management_requirements_path(project), import_csv_project_requirements_management_requirements_path(project),
...@@ -128,34 +116,33 @@ RSpec.describe Projects::RequirementsManagement::RequirementsController do ...@@ -128,34 +116,33 @@ RSpec.describe Projects::RequirementsManagement::RequirementsController do
headers: workhorse_headers headers: workhorse_headers
end 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 before do
project.add_reporter(user) project.add_reporter(user)
end end
context 'when feature is available' do context 'when requirements feature is enabled' do
before do
stub_licensed_features(requirements: true)
stub_feature_flags(import_requirements_csv: true)
end
it_behaves_like 'handle uploads authorize request' do it_behaves_like 'handle uploads authorize request' do
let(:uploader_class) { FileUploader } let(:uploader_class) { FileUploader }
let(:maximum_size) { Gitlab::CurrentSettings.max_attachment_size.megabytes } let(:maximum_size) { Gitlab::CurrentSettings.max_attachment_size.megabytes }
end end
end end
context 'when feature is disabled' do context 'when requirements feature is disabled' do
before do before do
stub_licensed_features(requirements: true) stub_licensed_features(requirements: false)
stub_feature_flags(import_requirements_csv: true)
end end
it_behaves_like 'response with 404 status' it_behaves_like 'response with 404 status'
end end
end end
context 'with an authorized user' do context 'with unauthorized user' do
it_behaves_like 'response with 404 status' it_behaves_like 'response with 404 status'
end end
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