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
46b8b0ff
Commit
46b8b0ff
authored
Apr 14, 2020
by
Alan Paruszewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add paths for notes and discussions when presenting single vulnerability
parent
0c02c15c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
ee/app/helpers/vulnerabilities_helper.rb
ee/app/helpers/vulnerabilities_helper.rb
+2
-0
ee/spec/helpers/vulnerabilities_helper_spec.rb
ee/spec/helpers/vulnerabilities_helper_spec.rb
+4
-1
No files found.
ee/app/helpers/vulnerabilities_helper.rb
View file @
46b8b0ff
...
...
@@ -8,6 +8,8 @@ module VulnerabilitiesHelper
vulnerability_json:
VulnerabilitySerializer
.
new
.
represent
(
vulnerability
).
to_json
,
project_fingerprint:
vulnerability
.
finding
.
project_fingerprint
,
create_issue_url:
create_vulnerability_feedback_issue_path
(
vulnerability
.
finding
.
project
),
notes_url:
project_security_vulnerability_notes_path
(
vulnerability
.
project
,
vulnerability
),
discussions_url:
discussions_project_security_vulnerability_path
(
vulnerability
.
project
,
vulnerability
),
pipeline_json:
vulnerability_pipeline_data
(
pipeline
).
to_json
,
has_mr:
!!
vulnerability
.
finding
.
merge_request_feedback
.
try
(
:merge_request_iid
),
vulnerability_feedback_help_path:
help_page_path
(
'user/application_security/index'
,
anchor:
'interacting-with-the-vulnerabilities'
),
...
...
ee/spec/helpers/vulnerabilities_helper_spec.rb
View file @
46b8b0ff
...
...
@@ -5,6 +5,7 @@ require 'spec_helper'
describe
VulnerabilitiesHelper
do
let_it_be
(
:user
)
{
build
(
:user
)
}
let_it_be
(
:vulnerability
)
{
create
(
:vulnerability
,
:with_findings
,
title:
"My vulnerability"
)
}
let_it_be
(
:project
)
{
vulnerability
.
project
}
let_it_be
(
:finding
)
{
vulnerability
.
finding
}
let
(
:vulnerability_serializer_hash
)
do
vulnerability
.
slice
(
...
...
@@ -57,7 +58,9 @@ describe VulnerabilitiesHelper do
expect
(
subject
).
to
include
(
vulnerability_json:
kind_of
(
String
),
project_fingerprint:
vulnerability
.
finding
.
project_fingerprint
,
create_issue_url:
kind_of
(
String
),
create_issue_url:
"/
#{
project
.
full_path
}
/-/vulnerability_feedback"
,
notes_url:
"/
#{
project
.
full_path
}
/-/security/vulnerabilities/
#{
vulnerability
.
id
}
/notes"
,
discussions_url:
"/
#{
project
.
full_path
}
/-/security/vulnerabilities/
#{
vulnerability
.
id
}
/discussions"
,
has_mr:
anything
,
vulnerability_feedback_help_path:
kind_of
(
String
),
finding_json:
kind_of
(
String
),
...
...
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