Class: Hyrax::BatchUploadsController

Inherits:
ApplicationController
  • Object
show all
Includes:
Hydra::Controller::ControllerBehavior, WorksControllerBehavior
Defined in:
app/controllers/hyrax/batch_uploads_controller.rb

Defined Under Namespace

Classes: BatchUploadFormService

Instance Method Summary collapse

Methods included from WorksControllerBehavior

#destroy, #edit, #file_manager, #inspect_work, #manifest, #new, #show, #update

Instance Method Details

#createObject

Note:

we don’t call ‘authorize!` directly, since `authorized_models` already checks `user.can? :create, …`

The permissions to create a batch are not as important as the permissions for the concern being batched.



27
28
29
30
31
32
33
34
35
# File 'app/controllers/hyrax/batch_uploads_controller.rb', line 27

def create
  authenticate_user!
  if Flipflop.batch_upload?
    handle_payload_concern!
    redirect_after_update!
  else
    respond_with_batch_upload_disabled
  end
end