Commit d5c0159f authored by Paul Slaughter's avatar Paul Slaughter

Fix missing expose_path for license api paths

This will fixes from occurring when relative_url_root is used.

https://gitlab.com/gitlab-org/gitlab-ee/issues/11121
parent 421b6752
......@@ -32,7 +32,7 @@ module EE
end
def license_management_api_url(project)
api_v4_projects_managed_licenses_path(id: project.id)
expose_path(api_v4_projects_managed_licenses_path(id: project.id))
end
def license_management_settings_path(project)
......
......@@ -68,7 +68,7 @@ module EE
end
expose :managed_licenses_path do |merge_request|
api_v4_projects_managed_licenses_path(id: merge_request.target_project.id)
expose_path(api_v4_projects_managed_licenses_path(id: merge_request.target_project.id))
end
expose :can_manage_licenses do |merge_request|
......
---
title: Fix relative url root issues with license management
merge_request: 12488
author:
type: fixed
......@@ -10,6 +10,7 @@ describe MergeRequestWidgetEntity do
let(:request) { double('request', current_user: user) }
before do
stub_config_setting(relative_url_root: '/gitlab')
project.add_developer(user)
end
......@@ -154,7 +155,7 @@ describe MergeRequestWidgetEntity do
end
describe '#managed_licenses_path' do
let(:managed_licenses_path) { api_v4_projects_managed_licenses_path(id: project.id) }
let(:managed_licenses_path) { expose_path(api_v4_projects_managed_licenses_path(id: project.id)) }
before do
create(:ee_ci_build, :legacy_license_management, pipeline: pipeline)
......
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