Sha256: 12e9069bf5ebe3835aba1047f7badc117cc0def038065f57d16ba7d8cd6b76de

Contents?: true

Size: 1.2 KB

Versions: 6

Compression:

Stored size: 1.2 KB

Contents

module Hydra
  class AdminPolicy < ActiveFedora::Base

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

    property :title, predicate: ::RDF::DC.title do |index|
      index.as :stored_searchable
    end
    property :description, predicate: ::RDF::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

6 entries across 6 versions & 1 rubygems

Version Path
hydra-access-controls-9.4.0 lib/hydra/admin_policy.rb
hydra-access-controls-9.3.0 lib/hydra/admin_policy.rb
hydra-access-controls-9.2.2 lib/hydra/admin_policy.rb
hydra-access-controls-9.2.1 lib/hydra/admin_policy.rb
hydra-access-controls-9.2.0 lib/hydra/admin_policy.rb
hydra-access-controls-9.2.0.rc1 lib/hydra/admin_policy.rb