Commit abcca71e authored by Fernando's avatar Fernando

Implement backend code review changes

* Implement code review changes from
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25300

That MR was abandoned in favor of
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25407
parent 9cfdefdc
---
title: Fix broken license policy page
merge_request: 25300
author:
type: fixed
...@@ -87,7 +87,7 @@ module Projects ...@@ -87,7 +87,7 @@ module Projects
def write_license_policies_endpoint def write_license_policies_endpoint
if can?(current_user, :admin_software_license_policy, @project) if can?(current_user, :admin_software_license_policy, @project)
api_v4_projects_managed_licenses_path(id: @project.id) expose_path(api_v4_projects_managed_licenses_path(id: @project.id))
else else
'' ''
end end
...@@ -96,7 +96,7 @@ module Projects ...@@ -96,7 +96,7 @@ module Projects
def licenses_app_data def licenses_app_data
{ {
project_licenses_endpoint: project_licenses_path(@project, detected: true, format: :json), project_licenses_endpoint: project_licenses_path(@project, detected: true, format: :json),
read_license_policies_endpoint: api_v4_projects_managed_licenses_path(id: @project.id), read_license_policies_endpoint: expose_path(api_v4_projects_managed_licenses_path(id: @project.id)),
write_license_policies_endpoint: write_license_policies_endpoint, write_license_policies_endpoint: write_license_policies_endpoint,
documentation_path: help_page_path('user/application_security/license_compliance/index'), documentation_path: help_page_path('user/application_security/license_compliance/index'),
empty_state_svg_path: helpers.image_path('illustrations/Dependency-list-empty-state.svg') empty_state_svg_path: helpers.image_path('illustrations/Dependency-list-empty-state.svg')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment