Skip to content
Snippets Groups Projects
Unverified Commit c27a5d23 authored by Ash McKenzie's avatar Ash McKenzie
Browse files

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
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Loading
Loading
@@ -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)
Loading
Loading
@@ -65,7 +69,7 @@ module Gitlab
check_push_access!
end
 
true
::Gitlab::GitAccessResult::Success.new
end
 
def guest_can_download_code?
Loading
Loading
@@ -92,6 +96,10 @@ module Gitlab
 
private
 
def check_custom_action!(cmd)
false
end
def check_valid_actor!
return unless actor.is_a?(Key)
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment