|
|
|
|
@ -55,6 +55,12 @@ function islandlives_entity_access(\Drupal\Core\Entity\EntityInterface $entity,
|
|
|
|
|
return \Drupal\Core\Access\AccessResult::forbidden('Media is not published.'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$moduleHandler = \Drupal::service('module_handler'); |
|
|
|
|
if (!$moduleHandler->moduleExists('islandora_hierarchical_access')) { |
|
|
|
|
return \Drupal\Core\Access\AccessResult::neutral(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
elseif ($entity instanceof \Drupal\file\FileInterface) { |
|
|
|
|
// Get all media attached to the files. |
|
|
|
|
$media = \Drupal::database()->select(\Drupal\islandora_hierarchical_access\LUTGeneratorInterface::TABLE_NAME, 'lut') |
|
|
|
|
|