summaryrefslogtreecommitdiff
path: root/lib/gitlab_net.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-02-08 14:44:26 +0000
committerRémy Coutable <remy@rymai.me>2017-02-08 14:44:26 +0000
commitbb4b8091d5f7817c192bac559ab65205982716ef (patch)
treecceba26057195d60e0253a5439eac9b9da57d996 /lib/gitlab_net.rb
parent0cc6cfc11be21597b11470c1c1aaa7e4a92618db (diff)
parentf85d650e67d199f43259a9181d7c0406571f4bcf (diff)
downloadgitlab-shell-3-6-stable.tar.gz
Merge branch 'backport-112-to-3-6-stable' into '3-6-stable' v3.6.73-6-stable
Backport "Pass relevant git environment variables while calling `/allowed`" to 3-6-stable See merge request !120
Diffstat (limited to 'lib/gitlab_net.rb')
-rw-r--r--lib/gitlab_net.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/gitlab_net.rb b/lib/gitlab_net.rb
index 994f8d5..30fe5c4 100644
--- a/lib/gitlab_net.rb
+++ b/lib/gitlab_net.rb
@@ -15,14 +15,15 @@ class GitlabNet
CHECK_TIMEOUT = 5
READ_TIMEOUT = 300
- def check_access(cmd, repo, actor, changes, protocol)
+ def check_access(cmd, repo, actor, changes, protocol, env: {})
changes = changes.join("\n") unless changes.kind_of?(String)
params = {
action: cmd,
changes: changes,
project: project_name(repo),
- protocol: protocol
+ protocol: protocol,
+ env: env
}
if actor =~ /\Akey\-\d+\Z/