Sha256: aff5591edd5683293187350ee1d39008ce5075dc66869429ea9f7584e015a0d0

Contents?: true

Size: 970 Bytes

Versions: 29

Compression:

Stored size: 970 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  module Actors
    class Environment
      # @param [ActiveFedora::Base] curation_concern work to operate on
      # @param [Ability] current_ability the authorizations of the acting user
      # @param [ActionController::Parameters] attributes user provided form attributes
      def initialize(curation_concern, current_ability, attributes)
        @curation_concern = curation_concern
        @current_ability = current_ability
        @attributes = attributes.to_h.with_indifferent_access
      end

      ##
      # @!attribute [rw] attributes
      #   @return [Hash]
      # @!attribute [rw] curation_concern
      #   @return [Object]
      # @!attribute [rw] current_ability
      #   @return [Hyrax::Ability]
      attr_accessor :attributes, :curation_concern, :current_ability

      # @return [User] the user from the current_ability
      def user
        current_ability.current_user
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
hyrax-5.1.0.pre.beta1 app/actors/hyrax/actors/environment.rb
hyrax-5.0.4 app/actors/hyrax/actors/environment.rb
hyrax-5.0.3 app/actors/hyrax/actors/environment.rb
hyrax-5.0.2 app/actors/hyrax/actors/environment.rb
hyrax-5.0.1 app/actors/hyrax/actors/environment.rb
hyrax-5.0.0 app/actors/hyrax/actors/environment.rb
hyrax-5.0.0.rc3 app/actors/hyrax/actors/environment.rb
hyrax-5.0.0.rc2 app/actors/hyrax/actors/environment.rb
hyrax-5.0.0.rc1 app/actors/hyrax/actors/environment.rb
hyrax-3.6.0 app/actors/hyrax/actors/environment.rb
hyrax-4.0.0 app/actors/hyrax/actors/environment.rb
hyrax-4.0.0.rc3 app/actors/hyrax/actors/environment.rb
hyrax-4.0.0.rc2 app/actors/hyrax/actors/environment.rb
hyrax-4.0.0.rc1 app/actors/hyrax/actors/environment.rb
hyrax-3.5.0 app/actors/hyrax/actors/environment.rb
hyrax-4.0.0.beta2 app/actors/hyrax/actors/environment.rb
hyrax-3.4.2 app/actors/hyrax/actors/environment.rb
hyrax-4.0.0.beta1 app/actors/hyrax/actors/environment.rb
hyrax-3.4.1 app/actors/hyrax/actors/environment.rb
hyrax-3.4.0 app/actors/hyrax/actors/environment.rb