app/controllers/hyrax/etds_controller.rb
# Adds Hyrax behaviors to the controller.
Adds Hyrax behaviors to the controller.
Adds Hyrax behaviors to the controller .
def enforce_file_visibility(work)
        visibility_attrs =
          FileSetVisibilityAttributeBuilder
            .new(work: work)
            .build
        work.file_sets.each do |fs|
          Hyrax::Actors::FileSetActor
            .new(fs, current_user)
            .update_metadata(visibility_attrs) ||
            Rails.logger.debug("#{self.class} for #{work.class}: #{work.id} " \
                               "tried to update the embargo for #{fs.class}: " \
                               "#{fs.id}." \
                               "\n\tUpdate failed with a `false` return value " \
                               'from `Hyrax::Actors::FileSetActor#update_metadata`.' \
                               "\n\tThe visibility attributes were: #{visibility_attrs}." \
                               "\n\tThe existing embargo is #{fs.embargo}." \
                               "\n\tFIGURE OUT HOW TO REMOVE ME FROM THE LOG.")
        end
      end
def enforce_file_visibility ( work ) visibility_attrs = FileSetVisibilityAttributeBuilder . new ( work : work ) . build work . file_sets . each do | fs | Hyrax :: Actors :: FileSetActor . new ( fs , current_user ) . update_metadata ( visibility_attrs ) || Rails . logger . debug ( "#{self.class} for #{work.class}: #{work.id} " "tried to update the embargo for #{fs.class}: " "#{fs.id}." "\n\tUpdate failed with a `false` return value " 'from `Hyrax::Actors::FileSetActor#update_metadata`.' "\n\tThe visibility attributes were: #{visibility_attrs}." "\n\tThe existing embargo is #{fs.embargo}." "\n\tFIGURE OUT HOW TO REMOVE ME FROM THE LOG." ) end end
Adds Hyrax behaviors to the controller.
Adds Hyrax behaviors to the controller .
work
<not_specific>