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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
927ab56c
Commit
927ab56c
authored
Sep 26, 2016
by
Patricio Cano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use GitLab Routing helpers for the documentation URL in `LfsHelper`
parent
f590e6f1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
app/helpers/lfs_helper.rb
app/helpers/lfs_helper.rb
+5
-3
No files found.
app/helpers/lfs_helper.rb
View file @
927ab56c
module
LfsHelper
module
LfsHelper
include
Gitlab
::
Routing
.
url_helpers
def
require_lfs_enabled!
def
require_lfs_enabled!
return
if
Gitlab
.
config
.
lfs
.
enabled
return
if
Gitlab
.
config
.
lfs
.
enabled
render
(
render
(
json:
{
json:
{
message:
'Git LFS is not enabled on this GitLab server, contact your admin.'
,
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
status:
501
)
)
...
@@ -46,7 +48,7 @@ module LfsHelper
...
@@ -46,7 +48,7 @@ module LfsHelper
render
(
render
(
json:
{
json:
{
message:
'Access forbidden. Check your access level.'
,
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"
,
content_type:
"application/vnd.git-lfs+json"
,
status:
403
status:
403
...
@@ -57,7 +59,7 @@ module LfsHelper
...
@@ -57,7 +59,7 @@ module LfsHelper
render
(
render
(
json:
{
json:
{
message:
'Not found.'
,
message:
'Not found.'
,
documentation_url:
"
#{
Gitlab
.
config
.
gitlab
.
url
}
/help"
,
documentation_url:
help_url
,
},
},
content_type:
"application/vnd.git-lfs+json"
,
content_type:
"application/vnd.git-lfs+json"
,
status:
404
status:
404
...
...
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