Browse Source

ISLANDORA-2073 Don't allow datastreams if object is forbidden.

pull/698/head
Rosie Le Faive 8 years ago
parent
commit
be84421191
  1. 8
      islandora.module

8
islandora.module

@ -1737,11 +1737,11 @@ function islandora_datastream_access($op, $datastream, $user = NULL) {
$user, $user,
)); ));
// The datastream check returned FALSE, and one in the object or datastream // Nothing returned FALSE at at least one thing returned TRUE
// checks returned TRUE. // for both the datastream and the object checks.
$cache[$op][$datastream->parent->id][$datastream->id][$user->uid] = ( $cache[$op][$datastream->parent->id][$datastream->id][$user->uid] = (
!in_array(FALSE, $datastream_results, TRUE) && (!in_array(FALSE, $datastream_results, TRUE) && in_array(TRUE, $datastream_results, TRUE)) &&
(in_array(TRUE, $object_results, TRUE) || in_array(TRUE, $datastream_results, TRUE)) (!in_array(FALSE, $object_results, TRUE) && in_array(TRUE, $object_results, TRUE))
); );
} }

Loading…
Cancel
Save