Fix uses of `api_v4.*_path` that need to be exposed

Description

(Identified in https://gitlab.com/gitlab-org/gitlab-ee/issues/11107#note_159981582)

There are multiple places in our code where we use an api_v4.*_path variable without wrapping it with the expose_path function. This causes issues when GitLab is configured with a relative_url_root.

TODO

git grep -E "api_v4.*path" | grep -v expose_ | grep -v _spec | grep -v gitlab.url
  • app/views/projects/issues/show.html.haml:90: #js-related-merge-requests{ data: { endpoint: api_v4_projects_issues_related_merge_requests_path(id: @project.id, issue_iid: @issue.iid), project_namespace: @project.namespace.path, project_path: @project.path } }
  • ee/app/helpers/ee/gitlab_routing_helper.rb:35: api_v4_projects_managed_licenses_path(id: project.id) - !12488 (merged)
  • ee/app/helpers/license_helper.rb:115: licenses_path: api_v4_licenses_path, delete_license_path: api_v4_license_path(id: ':id'),
  • ee/app/serializers/ee/merge_request_widget_entity.rb:71: api_v4_projects_managed_licenses_path(id: merge_request.target_project.id) - !12488 (merged)
  • ee/lib/ee/gitlab/geo_git_access.rb:103: api_v4_geo_proxy_git_push_ssh_info_refs_path,
  • ee/lib/ee/gitlab/geo_git_access.rb:104: api_v4_geo_proxy_git_push_ssh_push_path
  • ee/lib/gitlab/geo/oauth/session.rb:17: api.get(api_v4_user_path).parsed

/cc @stanhu

Edited by Paul Slaughter