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)) ); }