Module: Hyrax::PermissionIndexer
- Included in:
- Indexers::AdministrativeSetIndexer, Indexers::FileSetIndexer, Indexers::PcdmCollectionIndexer, Indexers::PcdmObjectIndexer
- Defined in:
- app/indexers/concerns/hyrax/permission_indexer.rb
Overview
Indexes ‘*_groups`/`*_users` style permissions. We depend on these permissions being up-to-date in the index to support `Hyrax::Ability`.
Instance Method Summary collapse
Instance Method Details
#to_solr ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/indexers/concerns/hyrax/permission_indexer.rb', line 13 def to_solr super.tap do |index_document| config = Hydra.config. = resource. || Hyrax::PermissionManager.new(resource: resource) index_document[config.edit.group] = .edit_groups.to_a index_document[config.edit.individual] = .edit_users.to_a index_document[config.read.group] = .read_groups.to_a index_document[config.read.individual] = .read_users.to_a end end |