diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-09-27 11:48:54 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-09-27 11:48:54 +0000 |
commit | f4f06d002b557044c076cddf4838866858b40279 (patch) | |
tree | 73a588ee41cc5caca027067a5007d59313163b06 | |
parent | edebd5e76395883213e40e10b7bfdc81d20d351b (diff) | |
parent | 927ab56c7753b86b0d3efe3bb35573c9caeeb27f (diff) | |
download | gitlab-ce-f4f06d002b557044c076cddf4838866858b40279.tar.gz |
Merge branch 'lfs-helper-doc-link' into 'master'
Use GitLab Routing helpers for the documentation URL in `LfsHelper`
To reduce conflicts from changes introduced in gitlab-org/gitlab-ee!740
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/740#note_15782550
See merge request !6529
-rw-r--r-- | app/helpers/lfs_helper.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/helpers/lfs_helper.rb b/app/helpers/lfs_helper.rb index c15ecc8f86e..95b60aeab5f 100644 --- a/app/helpers/lfs_helper.rb +++ b/app/helpers/lfs_helper.rb @@ -1,11 +1,13 @@ module LfsHelper + include Gitlab::Routing.url_helpers + def require_lfs_enabled! return if Gitlab.config.lfs.enabled render( json: { message: 'Git LFS is not enabled on this GitLab server, contact your admin.', - documentation_url: "#{Gitlab.config.gitlab.url}/help", + documentation_url: help_url, }, status: 501 ) @@ -46,7 +48,7 @@ module LfsHelper render( json: { message: 'Access forbidden. Check your access level.', - documentation_url: "#{Gitlab.config.gitlab.url}/help", + documentation_url: help_url, }, content_type: "application/vnd.git-lfs+json", status: 403 @@ -57,7 +59,7 @@ module LfsHelper render( json: { message: 'Not found.', - documentation_url: "#{Gitlab.config.gitlab.url}/help", + documentation_url: help_url, }, content_type: "application/vnd.git-lfs+json", status: 404 |