lib/ddr/models/solr_document.rb in ddr-models-2.0.0.pre.3 vs lib/ddr/models/solr_document.rb in ddr-models-2.0.0.pre.4

- old
+ new

@@ -104,14 +104,10 @@ def title get(Ddr::IndexFields::TITLE) end alias_method :title_display, :title # duck-type Ddr::Models::Base - def principal_has_role?(principal, role) - (Array(self["admin_metadata__#{role}_ssim"]) & Array(principal)).any? - end - def identifier # We want the multivalued version here get(ActiveFedora::SolrService.solr_name(:identifier, :stored_searchable, type: :text)) end @@ -222,9 +218,13 @@ {} end def struct_map(type='default') struct_maps.present? ? struct_maps.fetch(type) : nil + end + + def effective_permissions(agents) + Ddr::Auth::EffectivePermissions.call(self, agents) end private def targets_query