From e4d3196583a637ef1683d0df9c0045baee215429 Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Tue, 3 Oct 2017 14:50:12 -0300 Subject: [PATCH] Object context for permission check. --- theme/theme.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/theme/theme.inc b/theme/theme.inc index d94b1345..c2879af8 100644 --- a/theme/theme.inc +++ b/theme/theme.inc @@ -21,7 +21,7 @@ function template_preprocess_islandora_default_edit(array &$variables) { $header[] = array('data' => t('Type')); $header[] = array('data' => t('Mime type')); $header[] = array('data' => t('Size')); - if (user_access(ISLANDORA_VIEW_DATASTREAM_HISTORY)) { + if (islandora_object_access(ISLANDORA_VIEW_DATASTREAM_HISTORY, $islandora_object)) { $header[] = array('data' => t('Versions')); } @@ -61,7 +61,7 @@ function template_preprocess_islandora_default_edit(array &$variables) { )), ); } - elseif (user_access(ISLANDORA_VIEW_DATASTREAM_HISTORY)) { + elseif (islandora_object_access(ISLANDORA_VIEW_DATASTREAM_HISTORY, $islandora_object)) { $row[] = array(); } $row[] = array(