diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2018-06-12 17:54:37 +0200 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2018-06-18 09:11:02 +0200 |
commit | 656d4ebf67b597e012f97edd04432e402d26fbc2 (patch) | |
tree | 47f64eb022598a158cece229d18b0450f0121573 /app/controllers/groups/uploads_controller.rb | |
parent | 937c1b5be91be4b500fa7cc1faf5d1aabbd16d41 (diff) | |
download | gitlab-ce-656d4ebf67b597e012f97edd04432e402d26fbc2.tar.gz |
Add workhorse authorize method for project/group uploads
This method can be used by workhorse to get presigned
URLs used for direct upload of files.
Diffstat (limited to 'app/controllers/groups/uploads_controller.rb')
-rw-r--r-- | app/controllers/groups/uploads_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/groups/uploads_controller.rb b/app/controllers/groups/uploads_controller.rb index f1578f75e88..74760194a1f 100644 --- a/app/controllers/groups/uploads_controller.rb +++ b/app/controllers/groups/uploads_controller.rb @@ -1,9 +1,11 @@ class Groups::UploadsController < Groups::ApplicationController include UploadsActions + include WorkhorseRequest skip_before_action :group, if: -> { action_name == 'show' && image_or_video? } - before_action :authorize_upload_file!, only: [:create] + before_action :authorize_upload_file!, only: [:create, :authorize] + before_action :verify_workhorse_api!, only: [:authorize] private |