Sha256: 745584d661c3ded74ca5ccf9e0181dc0bb6382d2280f5d6f58238833e6e7dee9
Contents?: true
Size: 672 Bytes
Versions: 9
Compression:
Stored size: 672 Bytes
Contents
module Ddr module Models module AccessControllable extend ActiveSupport::Concern included do # adds methods for managing Hydra rightsMetadata content include Hydra::AccessControls::Permissions unless include? Hydra::AccessControls::Permissions end def set_initial_permissions(user_creator = nil) if user_creator self.permissions_attributes = [{type: "user", access: "edit", name: user_creator.to_s}] end end def copy_permissions_from(other) # XXX active-fedora < 7.0 self.permissions_attributes = other.permissions.collect { |p| p.to_hash } end end end end
Version data entries
9 entries across 9 versions & 1 rubygems