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
2d6cafa7
Commit
2d6cafa7
authored
May 15, 2017
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Render GitAccess message if authorized
parent
ff8a053d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
app/controllers/projects/git_http_controller.rb
app/controllers/projects/git_http_controller.rb
+1
-5
No files found.
app/controllers/projects/git_http_controller.rb
View file @
2d6cafa7
...
@@ -68,17 +68,13 @@ class Projects::GitHttpController < Projects::GitHttpClientController
...
@@ -68,17 +68,13 @@ class Projects::GitHttpController < Projects::GitHttpClientController
def
render_denied
def
render_denied
if
user
&&
can?
(
user
,
:read_project
,
project
)
if
user
&&
can?
(
user
,
:read_project
,
project
)
render
plain:
access_
denied_
message
,
status: :forbidden
render
plain:
access_
check
.
message
,
status: :forbidden
else
else
# Do not leak information about project existence
# Do not leak information about project existence
render_not_found
render_not_found
end
end
end
end
def
access_denied_message
'Access denied'
end
def
upload_pack_allowed?
def
upload_pack_allowed?
return
false
unless
Gitlab
.
config
.
gitlab_shell
.
upload_pack
return
false
unless
Gitlab
.
config
.
gitlab_shell
.
upload_pack
...
...
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