diff options
author | Rémy Coutable <remy@rymai.me> | 2017-02-08 14:44:26 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-02-08 14:44:26 +0000 |
commit | bb4b8091d5f7817c192bac559ab65205982716ef (patch) | |
tree | cceba26057195d60e0253a5439eac9b9da57d996 /lib/gitlab_access.rb | |
parent | 0cc6cfc11be21597b11470c1c1aaa7e4a92618db (diff) | |
parent | f85d650e67d199f43259a9181d7c0406571f4bcf (diff) | |
download | gitlab-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_access.rb')
-rw-r--r-- | lib/gitlab_access.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/gitlab_access.rb b/lib/gitlab_access.rb index 04806b2..c1b30b0 100644 --- a/lib/gitlab_access.rb +++ b/lib/gitlab_access.rb @@ -21,7 +21,12 @@ class GitlabAccess end def exec - status = api.check_access('git-receive-pack', @repo_name, @actor, @changes, @protocol) + env = { + "GIT_ALTERNATE_OBJECT_DIRECTORIES" => ENV["GIT_ALTERNATE_OBJECT_DIRECTORIES"], + "GIT_OBJECT_DIRECTORY" => ENV["GIT_OBJECT_DIRECTORY"] + } + + status = api.check_access('git-receive-pack', @repo_name, @actor, @changes, @protocol, env: env.to_json) raise AccessDeniedError, status.message unless status.allowed? |