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, #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.



22
23
24
25
26
27
28
29
30
# File 'app/controllers/hyrax/batch_uploads_controller.rb', line 22

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