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
fbce2ca5
Commit
fbce2ca5
authored
Dec 23, 2020
by
Paul Gascou-Vaillancourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check feature flag and create policy
parent
8c2a7b02
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
ee/app/controllers/projects/on_demand_scans_controller.rb
ee/app/controllers/projects/on_demand_scans_controller.rb
+5
-1
No files found.
ee/app/controllers/projects/on_demand_scans_controller.rb
View file @
fbce2ca5
...
@@ -3,21 +3,25 @@
...
@@ -3,21 +3,25 @@
module
Projects
module
Projects
class
OnDemandScansController
<
Projects
::
ApplicationController
class
OnDemandScansController
<
Projects
::
ApplicationController
before_action
do
before_action
do
authorize_read_on_demand_scans!
push_frontend_feature_flag
(
:security_on_demand_scans_site_validation
,
@project
)
push_frontend_feature_flag
(
:security_on_demand_scans_site_validation
,
@project
)
push_frontend_feature_flag
(
:security_dast_site_profiles_additional_fields
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:security_dast_site_profiles_additional_fields
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:dast_saved_scans
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:dast_saved_scans
,
@project
,
default_enabled: :yaml
)
end
end
before_action
:authorize_read_on_demand_scans!
,
only:
[
:index
]
before_action
:authorize_create_on_demand_dast_scan!
,
only:
[
:new
,
:edit
]
feature_category
:dynamic_application_security_testing
feature_category
:dynamic_application_security_testing
def
index
def
index
end
end
def
new
def
new
not_found
unless
Feature
.
enabled?
(
:dast_saved_scans
,
@project
,
default_enabled: :yaml
)
end
end
def
edit
def
edit
not_found
unless
Feature
.
enabled?
(
:dast_saved_scans
,
@project
,
default_enabled: :yaml
)
end
end
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