Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2018-08-28 06:47:35 +0300
committerAsh McKenzie <amckenzie@gitlab.com>2018-09-06 11:38:19 +0300
commitc27a5d234435c22c0977a26dc83cb17f76eac4ac (patch)
tree07022b695911312243e47688e0f0a64cdaaccf69 /lib/gitlab/git_access.rb
parent31a752a782d4ed382f5a426bde06192f08962dce (diff)
GitAccess#check custom action support
- if #check_custom_action!(cmd) returns something, return from #check() - now returns :Gitlab::GitAccessResult::Success.new instead of true
Diffstat (limited to 'lib/gitlab/git_access.rb')
-rw-r--r--lib/gitlab/git_access.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb
index 258e19a340b..d74bcb8a459 100644
--- a/lib/gitlab/git_access.rb
+++ b/lib/gitlab/git_access.rb
@@ -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)