Sha256: 2368fa86a79b0643b3ecdc845a68ae3c98e8b48cfeb921e42e0a4a65846a3ad5
Contents?: true
Size: 632 Bytes
Versions: 20
Compression:
Stored size: 632 Bytes
Contents
class Hydra::PermissionsSolrDocument < SolrDocument def under_embargo? #permissions = permissions_doc(params[:id]) embargo_key = ActiveFedora::SolrService.solr_name("embargo_release_date", Hydra::Datastream::RightsMetadata.date_indexer) if self[embargo_key] embargo_date = Date.parse(self[embargo_key].split(/T/)[0]) return embargo_date > Date.parse(Time.now.to_s) end false end def is_public? access_key = ActiveFedora::SolrService.solr_name("access", Hydra::Datastream::RightsMetadata.indexer) self[access_key].present? && self[access_key].first.downcase == "public" end end
Version data entries
20 entries across 20 versions & 1 rubygems