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
acae7503
Commit
acae7503
authored
Dec 14, 2021
by
Tetiana Chupryna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address review comments
parent
4f5b10d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
ee/app/presenters/ee/projects/security/configuration_presenter.rb
...resenters/ee/projects/security/configuration_presenter.rb
+5
-0
ee/lib/ee/gitlab/security/scan_configuration.rb
ee/lib/ee/gitlab/security/scan_configuration.rb
+5
-4
ee/spec/lib/ee/gitlab/security/scan_configuration_spec.rb
ee/spec/lib/ee/gitlab/security/scan_configuration_spec.rb
+3
-1
No files found.
ee/app/presenters/ee/projects/security/configuration_presenter.rb
View file @
acae7503
...
...
@@ -4,12 +4,16 @@ module EE
module
Projects
module
Security
module
ConfigurationPresenter
extend
::
Gitlab
::
Utils
::
Override
private
override
:can_toggle_autofix
def
can_toggle_autofix
try
(
:auto_fix_permission
)
end
override
:autofix_enabled
def
autofix_enabled
{
dependency_scanning:
project_settings
&
.
auto_fix_dependency_scanning
,
...
...
@@ -17,6 +21,7 @@ module EE
}
end
override
:auto_fix_user_path
def
auto_fix_user_path
'/'
# TODO: real link will be updated with https://gitlab.com/gitlab-org/gitlab/-/issues/348463
end
...
...
ee/lib/ee/gitlab/security/scan_configuration.rb
View file @
acae7503
...
...
@@ -4,20 +4,21 @@ module EE
module
Gitlab
module
Security
module
ScanConfiguration
extend
::
Gitlab
::
Utils
::
Override
override
:available?
def
available?
super
||
project
.
licensed_feature_available?
(
type
)
end
def
configured?
configured
end
override
:configuration_path
def
configuration_path
configurable_scans
[
type
]
if
available?
||
always_available?
end
private
override
:configurable_scans
def
configurable_scans
strong_memoize
(
:configurable_scans
)
do
{
...
...
ee/spec/lib/ee/gitlab/security/scan_configuration_spec.rb
View file @
acae7503
...
...
@@ -19,7 +19,9 @@ RSpec.describe ::Gitlab::Security::ScanConfiguration do
stub_licensed_features
(
sast:
false
)
end
it
{
is_expected
.
to
be_truthy
}
it
'core scanners (SAST, Secret Detection) are always available'
do
is_expected
.
to
be_truthy
end
end
context
'with licensed scanner that is available'
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