summaryrefslogtreecommitdiff
path: root/lib/gitlab_net.rb
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2016-06-20 21:13:53 -0500
committerPatricio Cano <suprnova32@gmail.com>2016-07-05 18:01:12 -0500
commit44e7804ddb408d85f091c7a5cd36e0fdbec63d13 (patch)
tree16956fba9120d6e0fb91fd8b38c55f3c2290c6de /lib/gitlab_net.rb
parent5afdd3f1cc3f12d4e919edb554c755b227675d06 (diff)
downloadgitlab-shell-44e7804ddb408d85f091c7a5cd36e0fdbec63d13.tar.gz
Allow GitLab Shell to check for allowed access based on the used Git protocol.
Diffstat (limited to 'lib/gitlab_net.rb')
-rw-r--r--lib/gitlab_net.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab_net.rb b/lib/gitlab_net.rb
index dd9a4b0..24e97be 100644
--- a/lib/gitlab_net.rb
+++ b/lib/gitlab_net.rb
@@ -14,7 +14,7 @@ class GitlabNet
CHECK_TIMEOUT = 5
READ_TIMEOUT = 300
- def check_access(cmd, repo, actor, changes)
+ def check_access(cmd, repo, actor, changes, protocol = nil)
project_name = repo.gsub("'", "")
project_name = project_name.gsub(/\.git\Z/, "")
project_name = project_name.gsub(/\A\//, "")
@@ -24,6 +24,7 @@ class GitlabNet
action: cmd,
changes: changes,
project: project_name,
+ protocol: protocol
}
if actor =~ /\Akey\-\d+\Z/