From be844211910997884621219114711b5daeb49053 Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Wed, 20 Dec 2017 16:11:52 -0500 Subject: [PATCH] ISLANDORA-2073 Don't allow datastreams if object is forbidden. --- islandora.module | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/islandora.module b/islandora.module index 0efc7cc4..171fa808 100644 --- a/islandora.module +++ b/islandora.module @@ -1737,11 +1737,11 @@ function islandora_datastream_access($op, $datastream, $user = NULL) { $user, )); - // The datastream check returned FALSE, and one in the object or datastream - // checks returned TRUE. + // Nothing returned FALSE at at least one thing returned TRUE + // for both the datastream and the object checks. $cache[$op][$datastream->parent->id][$datastream->id][$user->uid] = ( - !in_array(FALSE, $datastream_results, TRUE) && - (in_array(TRUE, $object_results, TRUE) || in_array(TRUE, $datastream_results, TRUE)) + (!in_array(FALSE, $datastream_results, TRUE) && in_array(TRUE, $datastream_results, TRUE)) && + (!in_array(FALSE, $object_results, TRUE) && in_array(TRUE, $object_results, TRUE)) ); }