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
9876141b
Commit
9876141b
authored
Mar 26, 2020
by
Michał Zając
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow vulnerability_data to return links for users
parent
2227509d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
ee/app/helpers/vulnerabilities_helper.rb
ee/app/helpers/vulnerabilities_helper.rb
+3
-4
ee/app/views/projects/security/vulnerabilities/show.html.haml
...pp/views/projects/security/vulnerabilities/show.html.haml
+1
-1
No files found.
ee/app/helpers/vulnerabilities_helper.rb
View file @
9876141b
# frozen_string_literal: true
module
VulnerabilitiesHelper
def
vulnerability_data
(
vulnerability
,
pipeline
)
def
vulnerability_data
(
vulnerability
,
pipeline
,
current_user:
nil
)
return
unless
vulnerability
{
...
...
@@ -9,10 +9,9 @@ module VulnerabilitiesHelper
project_fingerprint:
vulnerability
.
finding
.
project_fingerprint
,
create_issue_url:
create_vulnerability_feedback_issue_path
(
vulnerability
.
finding
.
project
),
pipeline_json:
vulnerability_pipeline_data
(
pipeline
).
to_json
,
finding:
Vulnerabilities
::
OccurrenceSerializer
.
new
({}).
represent
(
@vulnerability
.
finding
).
to_json
,
has_mr:
!!
@vulnerability
.
finding
.
merge_request_feedback
.
try
(
:merge_request_iid
),
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"
),
finding_json:
vulnerability_finding_data
(
vulnerability
.
finding
).
to_json
finding_json:
vulnerability_finding_data
(
vulnerability
.
finding
,
current_user:
current_user
).
to_json
}
end
...
...
ee/app/views/projects/security/vulnerabilities/show.html.haml
View file @
9876141b
...
...
@@ -4,7 +4,7 @@
-
page_title
@vulnerability
.
title
-
page_description
@vulnerability
.
description
#js-vulnerability-management-app
{
data:
vulnerability_data
(
@vulnerability
,
@pipeline
)
}
#js-vulnerability-management-app
{
data:
vulnerability_data
(
@vulnerability
,
@pipeline
,
current_user:
@current_user
)
}
.issue-details.issuable-details
.detail-page-description
...
...
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