提交 2d6cafa7 编写于 作者: M Michael Kozono

Render GitAccess message if authorized

上级 ff8a053d
......@@ -68,17 +68,13 @@ class Projects::GitHttpController < Projects::GitHttpClientController
def render_denied
if user && can?(user, :read_project, project)
render plain: access_denied_message, status: :forbidden
render plain: access_check.message, status: :forbidden
else
# Do not leak information about project existence
render_not_found
end
end
def access_denied_message
'Access denied'
end
def upload_pack_allowed?
return false unless Gitlab.config.gitlab_shell.upload_pack
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册