Commit c27a5d23 authored by Ash McKenzie's avatar Ash McKenzie

GitAccess#check custom action support

- if #check_custom_action!(cmd) returns something, return from #check()
- now returns :Gitlab::GitAccessResult::Success.new instead of true
parent 31a752a7
......@@ -50,6 +50,10 @@ module Gitlab
check_authentication_abilities!(cmd)
check_command_disabled!(cmd)
check_command_existence!(cmd)
custom_action = check_custom_action!(cmd)
return custom_action if custom_action
check_db_accessibility!(cmd)
ensure_project_on_push!(cmd, changes)
......@@ -65,7 +69,7 @@ module Gitlab
check_push_access!
end
true
::Gitlab::GitAccessResult::Success.new
end
def guest_can_download_code?
......@@ -92,6 +96,10 @@ module Gitlab
private
def check_custom_action!(cmd)
false
end
def check_valid_actor!
return unless actor.is_a?(Key)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment