Sha256: 3e048d78d245a4c96741f8a5ef21511838225a8d9a66935067a8f2fc23b05f9e

Contents?: true

Size: 1.21 KB

Versions: 9

Compression:

Stored size: 1.21 KB

Contents

module Hydra
  class AdminPolicy < ActiveFedora::Base

    include Hydra::AdminPolicyBehavior
    include Hydra::AccessControls::Permissions

    property :title, predicate: ::RDF::Vocab::DC.title do |index|
      index.as :stored_searchable
    end
    property :description, predicate: ::RDF::Vocab::DC.description do |index|
      index.as :searchable
    end

    # Hack until ActiveFedora supports activeTriples 0.3.0 (then we can just use super)
    def description_with_first
      description_without_first.first
    end
    alias_method_chain :description, :first

    # Hack until ActiveFedora supports activeTriples 0.3.0 (then we can just use super)
    def title_with_first
      title_without_first.first
    end
    alias_method_chain :title, :first

    def license_title=(_)
      Deprecation.warn AdminPolicy, "license_title= has been removed from AdminPolicy. Look at Hydra::Rights instead"
    end

    def license_description=(_)
      Deprecation.warn AdminPolicy, "license_description= has been removed from AdminPolicy. Look at Hydra::Rights instead"
    end

    def license_url=(_)
      Deprecation.warn AdminPolicy, "license_url= has been removed from AdminPolicy. Look at Hydra::Rights instead"
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hydra-access-controls-9.10.0 lib/hydra/admin_policy.rb
hydra-access-controls-9.9.0 lib/hydra/admin_policy.rb
hydra-access-controls-9.8.1 lib/hydra/admin_policy.rb
hydra-access-controls-9.8.0 lib/hydra/admin_policy.rb
hydra-access-controls-9.7.1 lib/hydra/admin_policy.rb
hydra-access-controls-9.7.0 lib/hydra/admin_policy.rb
hydra-access-controls-9.6.0 lib/hydra/admin_policy.rb
hydra-access-controls-9.5.0 lib/hydra/admin_policy.rb
hydra-access-controls-9.4.1 lib/hydra/admin_policy.rb