diff options
Diffstat (limited to 'app/controllers/repositories/lfs_api_controller.rb')
-rw-r--r-- | app/controllers/repositories/lfs_api_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/repositories/lfs_api_controller.rb b/app/controllers/repositories/lfs_api_controller.rb index 4f2e02c78c3..a7719516cb6 100644 --- a/app/controllers/repositories/lfs_api_controller.rb +++ b/app/controllers/repositories/lfs_api_controller.rb @@ -10,6 +10,10 @@ module Repositories skip_before_action :lfs_check_access!, only: [:deprecated] before_action :lfs_check_batch_operation!, only: [:batch] + # added here as a part of the refactor, will be removed + # https://gitlab.com/gitlab-org/gitlab/-/issues/328692 + delegate :deploy_token, :user, to: :authentication_result, allow_nil: true + def batch unless objects.present? render_lfs_not_found @@ -141,7 +145,7 @@ module Repositories end def lfs_auth_header - return unless user.is_a?(User) + return unless user Gitlab::LfsToken.new(user).basic_encoding end |