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
ab7e0608
Commit
ab7e0608
authored
Jun 10, 2020
by
mo khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Authorize #license_scanning_reports endpoint
* Add CHANGELOG entry
parent
62f9013b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
ee/app/controllers/ee/projects/merge_requests_controller.rb
ee/app/controllers/ee/projects/merge_requests_controller.rb
+1
-0
ee/changelogs/unreleased/208723-license-compliance-permissions.yml
...logs/unreleased/208723-license-compliance-permissions.yml
+5
-0
ee/spec/controllers/projects/merge_requests_controller_spec.rb
...ec/controllers/projects/merge_requests_controller_spec.rb
+5
-1
No files found.
ee/app/controllers/ee/projects/merge_requests_controller.rb
View file @
ab7e0608
...
...
@@ -17,6 +17,7 @@ module EE
before_action
:whitelist_query_limiting_ee_merge
,
only:
[
:merge
]
before_action
:whitelist_query_limiting_ee_show
,
only:
[
:show
]
before_action
:authorize_read_pipeline!
,
only:
[
:container_scanning_reports
,
:dependency_scanning_reports
,
:license_scanning_reports
,
:sast_reports
,
:secret_detection_reports
,
:dast_reports
,
:metrics_reports
]
end
...
...
ee/changelogs/unreleased/208723-license-compliance-permissions.yml
0 → 100644
View file @
ab7e0608
---
title
:
'
Authorize
access
to
view
license
scan
reports'
merge_request
:
34324
author
:
type
:
fixed
ee/spec/controllers/projects/merge_requests_controller_spec.rb
View file @
ab7e0608
...
...
@@ -784,7 +784,7 @@ RSpec.describe Projects::MergeRequestsController do
before
do
allow_any_instance_of
(
::
MergeRequest
).
to
receive
(
:compare_reports
)
.
with
(
::
Ci
::
CompareLicenseScanningReportsService
,
project
.
users
.
first
).
and_return
(
comparison_status
)
.
with
(
::
Ci
::
CompareLicenseScanningReportsService
,
viewer
).
and_return
(
comparison_status
)
end
context
'when comparison is being processed'
do
...
...
@@ -836,6 +836,10 @@ RSpec.describe Projects::MergeRequestsController do
expect
(
json_response
).
to
eq
({
'status_reason'
=>
'Failed to parse license scanning reports'
})
end
end
context
"when authorizing access to license scan reports"
do
it_behaves_like
'authorize read pipeline'
end
end
describe
'GET #metrics_reports'
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