Sha256: f646be3503be5b6c7ab0178b98d563fe35a0a1da8f34a3752f4473d0e125bcca

Contents?: true

Size: 1.06 KB

Versions: 46

Compression:

Stored size: 1.06 KB

Contents

module Hyrax
  class PermissionsController < ApplicationController
    helper_method :curation_concern

    def confirm
      # intentional noop to display default view
    end

    def copy
      authorize! :edit, curation_concern
      VisibilityCopyJob.perform_later(curation_concern)
      flash_message = 'Updating file permissions. This may take a few minutes. You may want to refresh your browser or return to this record later to see the updated file permissions.'
      redirect_to [main_app, curation_concern], notice: flash_message
    end

    def confirm_access
      # intentional noop to display default view
    end

    def copy_access
      authorize! :edit, curation_concern
      # copy visibility
      VisibilityCopyJob.perform_later(curation_concern)

      # copy permissions
      InheritPermissionsJob.perform_later(curation_concern)
      redirect_to [main_app, curation_concern], notice: I18n.t("hyrax.upload.change_access_flash_message")
    end

    def curation_concern
      @curation_concern ||= ActiveFedora::Base.find(params[:id])
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/controllers/hyrax/permissions_controller.rb
hyrax-2.9.5 app/controllers/hyrax/permissions_controller.rb
hyrax-2.9.4 app/controllers/hyrax/permissions_controller.rb
hyrax-2.9.3 app/controllers/hyrax/permissions_controller.rb
hyrax-2.9.2 app/controllers/hyrax/permissions_controller.rb
hyrax-2.9.1 app/controllers/hyrax/permissions_controller.rb
hyrax-2.9.0 app/controllers/hyrax/permissions_controller.rb
hyrax-2.8.0 app/controllers/hyrax/permissions_controller.rb
hyrax-2.7.2 app/controllers/hyrax/permissions_controller.rb
hyrax-2.7.1 app/controllers/hyrax/permissions_controller.rb
hyrax-2.7.0 app/controllers/hyrax/permissions_controller.rb
hyrax-2.6.0 app/controllers/hyrax/permissions_controller.rb
hyrax-2.5.1 app/controllers/hyrax/permissions_controller.rb
hyrax-2.5.0 app/controllers/hyrax/permissions_controller.rb
hyrax-3.0.0.pre.beta2 app/controllers/hyrax/permissions_controller.rb
hyrax-2.4.1 app/controllers/hyrax/permissions_controller.rb
hyrax-3.0.0.pre.beta1 app/controllers/hyrax/permissions_controller.rb
hyrax-2.4.0 app/controllers/hyrax/permissions_controller.rb
hyrax-2.3.3 app/controllers/hyrax/permissions_controller.rb
hyrax-2.3.2 app/controllers/hyrax/permissions_controller.rb