app/controllers/hyrax/etds_controller.rb
##
# Our file set visibility behavior is somewhat different from Hyrax's
# default behavior. When we update work visibility or permissions, we
# want to ensure that the FileSets are given permissions congruent with
# the embargo settings. We do this by setting the FileSet visibility using
# `FileSetActor` directly, inline.
#
# We can afford to run this inline, because we don't expect works with
# dozens or hundreds of FileSets.
#
# Overriding this method avoids redirects to confirmation pages when
# updating the visibility and permissions of a work.
Our file set visibility behavior is somewhat different from Hyrax's
default behavior. When we update work visibility or permissions, we
want to ensure that the FileSets are given permissions congruent with
the embargo settings. We do this by setting the FileSet visibility using
`FileSetActor` directly, inline.

We can afford to run this inline, because we don't expect works with
dozens or hundreds of FileSets.

Overriding this method avoids redirects to confirmation pages when
updating the visibility and permissions of a work.
Our file set visibility behavior is somewhat different from Hyrax ' s default behavior . When we update work visibility or permissions we want to ensure that the FileSets are given permissions congruent with the embargo settings . We do this by setting the FileSet visibility using ` FileSetActor ` directly inline . We can afford to run this inline because we don ' t expect works with dozens or hundreds of FileSets . Overriding this method avoids redirects to confirmation pages when updating the visibility and permissions of a work .
def after_update_response
      if must_update_file_visibility?(curation_concern)
        Rails.logger.debug("#{self.class} for #{curation_concern.class}: #{curation_concern.id} " \
                           "is about to update the embargos for its FileSets")
        enforce_file_visibility(curation_concern)
      end
      respond_to do |wants|
        wants.html { redirect_to [main_app, curation_concern], notice: "Work \"#{curation_concern}\" successfully updated." }
        wants.json { render :show, status: :ok, location: polymorphic_path([main_app, curation_concern]) }
      end
    end
def after_update_response if must_update_file_visibility? ( curation_concern ) Rails . logger . debug ( "#{self.class} for #{curation_concern.class}: #{curation_concern.id} " "is about to update the embargos for its FileSets" ) enforce_file_visibility ( curation_concern ) end respond_to do | wants | wants . html { redirect_to [ main_app , curation_concern ] , notice : "Work \"#{curation_concern}\" successfully updated." } wants . json { render :show , status : :ok , location : polymorphic_path ( [ main_app , curation_concern ] ) } end end
Our file set visibility behavior is somewhat different from Hyrax's
default behavior.
Our file set visibility behavior is somewhat different from Hyrax ' s default behavior .