diff options
author | Ash McKenzie <amckenzie@gitlab.com> | 2018-07-26 17:52:47 +1000 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2018-07-30 10:39:17 +1000 |
commit | 5ef06ac7eaf91c7ee4c32ed63c389b87aece5de8 (patch) | |
tree | 60a79a8f6455c88298dc4452ca5decddf3fa9435 /lib/gitlab_shell.rb | |
parent | 724d7c2ff5f6a5c75c6bab8137a97a0dac6f05ed (diff) | |
download | gitlab-shell-5ef06ac7eaf91c7ee4c32ed63c389b87aece5de8.tar.gz |
Move GL_PROTOCOL into GitlabNet
Diffstat (limited to 'lib/gitlab_shell.rb')
-rw-r--r-- | lib/gitlab_shell.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb index 9644cf4..6c5f097 100644 --- a/lib/gitlab_shell.rb +++ b/lib/gitlab_shell.rb @@ -16,7 +16,6 @@ class GitlabShell # rubocop:disable Metrics/ClassLength 'git-receive-pack' => File.join(ROOT_PATH, 'bin', 'gitaly-receive-pack') }.freeze API_COMMANDS = %w(2fa_recovery_codes).freeze - GL_PROTOCOL = 'ssh'.freeze attr_accessor :key_id, :gl_repository, :repo_name, :command, :git_access attr_reader :repo_path @@ -101,7 +100,7 @@ class GitlabShell # rubocop:disable Metrics/ClassLength end def verify_access - status = api.check_access(@git_access, nil, @repo_name, @key_id, '_any', GL_PROTOCOL) + status = api.check_access(@git_access, nil, @repo_name, @key_id, '_any', GitlabNet::GL_PROTOCOL) raise AccessDeniedError, status.message unless status.allowed? @@ -162,7 +161,7 @@ class GitlabShell # rubocop:disable Metrics/ClassLength 'LD_LIBRARY_PATH' => ENV['LD_LIBRARY_PATH'], 'LANG' => ENV['LANG'], 'GL_ID' => @key_id, - 'GL_PROTOCOL' => GL_PROTOCOL, + 'GL_PROTOCOL' => GitlabNet::GL_PROTOCOL, 'GL_REPOSITORY' => @gl_repository, 'GL_USERNAME' => @username } |