diff options
author | Michael Kozono <mkozono@gmail.com> | 2017-05-17 15:47:59 -0700 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2017-06-05 05:32:26 -0700 |
commit | 957edb13fdb21e21efbc68fc342209f4b53a66e4 (patch) | |
tree | 5fa0b7fbac4135c2b7835729aa3cd81a213efc75 | |
parent | 9d78f83571e7dbfbab889102b497ada7c02f409d (diff) | |
download | gitlab-ce-957edb13fdb21e21efbc68fc342209f4b53a66e4.tar.gz |
Refactor to let `GitAccess` check protocol config
This already works due to previous refactoring.
-rw-r--r-- | app/controllers/projects/git_http_controller.rb | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/app/controllers/projects/git_http_controller.rb b/app/controllers/projects/git_http_controller.rb index 2c2766cf623..073c76933c1 100644 --- a/app/controllers/projects/git_http_controller.rb +++ b/app/controllers/projects/git_http_controller.rb @@ -10,8 +10,6 @@ class Projects::GitHttpController < Projects::GitHttpClientController render_ok elsif receive_pack? && receive_pack_allowed? render_ok - elsif http_blocked? - render_http_not_allowed else render_denied end @@ -62,10 +60,6 @@ class Projects::GitHttpController < Projects::GitHttpClientController render json: Gitlab::Workhorse.git_http_ok(repository, wiki?, user, action_name) end - def render_http_not_allowed - render plain: access_check.message, status: :forbidden - end - def render_denied if access_check.message == Gitlab::GitAccess::ERROR_MESSAGES[:project_not_found] render plain: access_check.message, status: :not_found @@ -93,10 +87,6 @@ class Projects::GitHttpController < Projects::GitHttpClientController @access_check ||= access.check(git_command, '_any') end - def http_blocked? - !access.protocol_allowed? - end - def receive_pack_allowed? access_check.allowed? end |