Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1453eb07
Commit
1453eb07
authored
Jan 29, 2021
by
Eugenia Grieff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove import_requirements_csv flag
- This FF is no longer needed
parent
67b670a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
36 deletions
+10
-36
config/feature_flags/development/import_requirements_csv.yml
config/feature_flags/development/import_requirements_csv.yml
+0
-8
ee/app/controllers/projects/requirements_management/requirements_controller.rb
...ojects/requirements_management/requirements_controller.rb
+0
-5
ee/spec/requests/projects/requirements_management/requirements_controller_spec.rb
...s/requirements_management/requirements_controller_spec.rb
+10
-23
No files found.
config/feature_flags/development/import_requirements_csv.yml
deleted
100644 → 0
View file @
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
ee/app/controllers/projects/requirements_management/requirements_controller.rb
View file @
1453eb07
...
@@ -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'
...
...
ee/spec/requests/projects/requirements_management/requirements_controller_spec.rb
View file @
1453eb07
...
@@ -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
un
authorized user'
do
it_behaves_like
'response with 404 status'
it_behaves_like
'response with 404 status'
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment