Sha256: 1db1ff676638c5cb9cb53f6a20f64eb1fb623979df76cc0c7e1218ba180f6272

Contents?: true

Size: 651 Bytes

Versions: 35

Compression:

Stored size: 651 Bytes

Contents

module Ddr
  module Models
    module AccessControllable
      extend ActiveSupport::Concern
      extend Deprecation

      included do
        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
      deprecation_deprecate :set_initial_permissions

      def copy_permissions_from(other)
        self.permissions_attributes = other.permissions.collect { |p| p.to_hash }
      end
      deprecation_deprecate :copy_permissions_from
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
ddr-models-2.6.2 lib/ddr/models/access_controllable.rb
ddr-models-2.6.1 lib/ddr/models/access_controllable.rb
ddr-models-2.6.0 lib/ddr/models/access_controllable.rb
ddr-models-2.6.0.rc4 lib/ddr/models/access_controllable.rb
ddr-models-2.6.0.rc3 lib/ddr/models/access_controllable.rb
ddr-models-2.6.0.rc2 lib/ddr/models/access_controllable.rb
ddr-models-2.6.0.rc1 lib/ddr/models/access_controllable.rb
ddr-models-2.5.3 lib/ddr/models/access_controllable.rb
ddr-models-2.5.2 lib/ddr/models/access_controllable.rb
ddr-models-2.5.1 lib/ddr/models/access_controllable.rb
ddr-models-2.5.0 lib/ddr/models/access_controllable.rb
ddr-models-2.5.0.rc1 lib/ddr/models/access_controllable.rb
ddr-models-2.4.16 lib/ddr/models/access_controllable.rb
ddr-models-2.4.15 lib/ddr/models/access_controllable.rb
ddr-models-2.4.14 lib/ddr/models/access_controllable.rb
ddr-models-2.4.13 lib/ddr/models/access_controllable.rb
ddr-models-2.4.12 lib/ddr/models/access_controllable.rb
ddr-models-2.4.11 lib/ddr/models/access_controllable.rb
ddr-models-2.4.10 lib/ddr/models/access_controllable.rb
ddr-models-2.4.9 lib/ddr/models/access_controllable.rb