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
0c332366
Commit
0c332366
authored
Dec 23, 2020
by
Tetiana Chupryna
Committed by
Igor Drozdov
Dec 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error for projects without security setting
parent
281fda79
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
ee/app/services/security/store_report_service.rb
ee/app/services/security/store_report_service.rb
+1
-1
ee/changelogs/unreleased/bug-store-report-service-fix.yml
ee/changelogs/unreleased/bug-store-report-service-fix.yml
+5
-0
ee/spec/services/security/store_report_service_spec.rb
ee/spec/services/security/store_report_service_spec.rb
+12
-0
No files found.
ee/app/services/security/store_report_service.rb
View file @
0c332366
...
...
@@ -211,7 +211,7 @@ module Security
end
def
auto_fix_enabled?
return
false
unless
project
.
security_setting
.
auto_fix_enabled?
return
false
unless
project
.
security_setting
&
.
auto_fix_enabled?
project
.
security_setting
.
auto_fix_enabled_types
.
include?
(
report
.
type
.
to_sym
)
end
...
...
ee/changelogs/unreleased/bug-store-report-service-fix.yml
0 → 100644
View file @
0c332366
---
title
:
Fix StoreReportService related to autofix
merge_request
:
50490
author
:
type
:
fixed
ee/spec/services/security/store_report_service_spec.rb
View file @
0c332366
...
...
@@ -254,6 +254,18 @@ RSpec.describe Security::StoreReportService, '#execute' do
subject
end
end
context
'when security setting is not created'
do
before
do
project
.
security_setting
.
destroy!
project
.
reload
end
it
'does not start auto fix worker'
do
expect
(
Security
::
AutoFixWorker
).
not_to
receive
(
:perform_async
)
expect
(
subject
[
:status
]).
to
eq
(
:success
)
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