Module: Valkyrie::Resource::AccessControls

Defined in:
lib/valkyrie/resource/access_controls.rb

Overview

Provides an optional interface consistent with Hydra::AccessControls

Examples:

class CustomResource < Valkyrie::Resource
  include Valkyrie::Resource::AccessControls
  attribute :title
  attribute :member_ids
  attribute :nested_resource
end

See Also:

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



17
18
19
20
21
22
# File 'lib/valkyrie/resource/access_controls.rb', line 17

def self.included(klass)
  klass.attribute :read_groups, Valkyrie::Types::Set
  klass.attribute :read_users, Valkyrie::Types::Set
  klass.attribute :edit_users, Valkyrie::Types::Set
  klass.attribute :edit_groups, Valkyrie::Types::Set
end