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
e661e062
Commit
e661e062
authored
Dec 22, 2021
by
Fernando Arias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate corpus management UI to use seperate feature flag
* Refactor existing usages
parent
7e079330
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
15 additions
and
7 deletions
+15
-7
app/assets/javascripts/security_configuration/components/constants.js
...avascripts/security_configuration/components/constants.js
+1
-1
ee/app/controllers/ee/projects/security/configuration_controller.rb
...trollers/ee/projects/security/configuration_controller.rb
+1
-1
ee/app/controllers/projects/security/corpus_management_controller.rb
...rollers/projects/security/corpus_management_controller.rb
+1
-1
ee/config/feature_flags/development/corpus_management_ui.yml
ee/config/feature_flags/development/corpus_management_ui.yml
+8
-0
ee/lib/ee/gitlab/security/scan_configuration.rb
ee/lib/ee/gitlab/security/scan_configuration.rb
+1
-1
ee/spec/controllers/projects/security/configuration_controller_spec.rb
...ollers/projects/security/configuration_controller_spec.rb
+1
-1
ee/spec/lib/ee/gitlab/security/scan_configuration_spec.rb
ee/spec/lib/ee/gitlab/security/scan_configuration_spec.rb
+1
-1
spec/presenters/projects/security/configuration_presenter_spec.rb
...senters/projects/security/configuration_presenter_spec.rb
+1
-1
No files found.
app/assets/javascripts/security_configuration/components/constants.js
View file @
e661e062
...
...
@@ -254,7 +254,7 @@ export const securityFeatures = [
helpPath
:
COVERAGE_FUZZING_HELP_PATH
,
configurationHelpPath
:
COVERAGE_FUZZING_CONFIG_HELP_PATH
,
type
:
REPORT_TYPE_COVERAGE_FUZZING
,
secondary
:
gon
?.
features
?.
corpusManagement
secondary
:
gon
?.
features
?.
corpusManagement
Ui
?
{
type
:
REPORT_TYPE_CORPUS_MANAGEMENT
,
name
:
CORPUS_MANAGEMENT_NAME
,
...
...
ee/app/controllers/ee/projects/security/configuration_controller.rb
View file @
e661e062
...
...
@@ -14,7 +14,7 @@ module EE
before_action
only:
[
:show
]
do
push_frontend_feature_flag
(
:security_auto_fix
,
project
,
default_enabled:
false
)
push_frontend_feature_flag
(
:corpus_management
,
project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:corpus_management
_ui
,
project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:secure_vulnerability_training
,
project
,
default_enabled: :yaml
)
end
...
...
ee/app/controllers/projects/security/corpus_management_controller.rb
View file @
e661e062
...
...
@@ -6,7 +6,7 @@ module Projects
include
SecurityAndCompliancePermissions
before_action
do
render_404
unless
Feature
.
enabled?
(
:corpus_management
,
@project
,
default_enabled: :yaml
)
render_404
unless
Feature
.
enabled?
(
:corpus_management
_ui
,
@project
,
default_enabled: :yaml
)
authorize_read_coverage_fuzzing!
end
...
...
ee/config/feature_flags/development/corpus_management_ui.yml
0 → 100644
View file @
e661e062
---
name
:
corpus_management_ui
introduced_by_url
:
rollout_issue_url
:
milestone
:
'
14.7'
type
:
development
group
:
group::dynamic analysis
default_enabled
:
false
\ No newline at end of file
ee/lib/ee/gitlab/security/scan_configuration.rb
View file @
e661e062
...
...
@@ -25,7 +25,7 @@ module EE
dast:
project_security_configuration_dast_path
(
project
),
dast_profiles:
project_security_configuration_dast_scans_path
(
project
),
api_fuzzing:
project_security_configuration_api_fuzzing_path
(
project
),
corpus_management:
(
project_security_configuration_corpus_management_path
(
project
)
if
::
Feature
.
enabled?
(
:corpus_management
,
project
,
default_enabled: :yaml
))
corpus_management:
(
project_security_configuration_corpus_management_path
(
project
)
if
::
Feature
.
enabled?
(
:corpus_management
_ui
,
project
,
default_enabled: :yaml
))
}.
merge
(
super
)
end
end
...
...
ee/spec/controllers/projects/security/configuration_controller_spec.rb
View file @
e661e062
...
...
@@ -188,7 +188,7 @@ RSpec.describe Projects::Security::ConfigurationController do
before
do
stub_feature_flags
(
security_auto_fix:
false
)
stub_feature_flags
(
corpus_management:
false
)
stub_feature_flags
(
corpus_management
_ui
:
false
)
request
end
...
...
ee/spec/lib/ee/gitlab/security/scan_configuration_spec.rb
View file @
e661e062
...
...
@@ -82,7 +82,7 @@ RSpec.describe ::Gitlab::Security::ScanConfiguration do
context
'when feature flag is disabled'
do
before
do
stub_feature_flags
(
corpus_management:
false
)
stub_feature_flags
(
corpus_management
_ui
:
false
)
end
it
{
is_expected
.
to
be_nil
}
...
...
spec/presenters/projects/security/configuration_presenter_spec.rb
View file @
e661e062
...
...
@@ -14,7 +14,7 @@ RSpec.describe Projects::Security::ConfigurationPresenter do
before
do
stub_licensed_features
(
licensed_scan_types
.
to_h
{
|
type
|
[
type
,
true
]
})
stub_feature_flags
(
corpus_management:
false
)
stub_feature_flags
(
corpus_management
_ui
:
false
)
end
describe
'#to_html_data_attribute'
do
...
...
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