diff options
author | Ash McKenzie <amckenzie@gitlab.com> | 2018-11-07 10:07:52 +1100 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2018-11-08 09:52:10 +1100 |
commit | 1c6a8d1d70c1603c73fb9bcb8f440dbf97988e89 (patch) | |
tree | a83d262d697d3d5265716ddd8bf7650870063eca /lib/gitlab_shell.rb | |
parent | 9cf3334cb5cdf871266a2b9538589e36efd788e1 (diff) | |
download | gitlab-shell-1c6a8d1d70c1603c73fb9bcb8f440dbf97988e89.tar.gz |
Include LFS operation when making auth requestashmckenzie/8114-geo-push-ssh-lfs-http-auth-bug
Operation is either upload or download
Diffstat (limited to 'lib/gitlab_shell.rb')
-rw-r--r-- | lib/gitlab_shell.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb index 57c70f5..6ad67c1 100644 --- a/lib/gitlab_shell.rb +++ b/lib/gitlab_shell.rb @@ -155,8 +155,9 @@ class GitlabShell # rubocop:disable Metrics/ClassLength if @command == 'git-lfs-authenticate' GitlabMetrics.measure('lfs-authenticate') do - $logger.info('Processing LFS authentication', user: log_username) - lfs_authenticate + operation = args[2] + $logger.info('Processing LFS authentication', operation: operation, user: log_username) + lfs_authenticate(operation) end return end @@ -224,8 +225,8 @@ class GitlabShell # rubocop:disable Metrics/ClassLength @config.audit_usernames ? username : "user with id #{@gl_id}" end - def lfs_authenticate - lfs_access = api.lfs_authenticate(@gl_id, @repo_name) + def lfs_authenticate(operation) + lfs_access = api.lfs_authenticate(@gl_id, @repo_name, operation) return unless lfs_access |