From 7dc748b86715946bab4a03f48aeb287512fc8f7f Mon Sep 17 00:00:00 2001 From: Alexander O'Neill Date: Tue, 22 Feb 2011 11:01:32 -0400 Subject: [PATCH] ISLANDORA-171 Add permissoin check for book add pages tab. --- ilives/book.inc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ilives/book.inc b/ilives/book.inc index fdb5150a..608b9ba0 100644 --- a/ilives/book.inc +++ b/ilives/book.inc @@ -179,12 +179,14 @@ class IslandoraBook { // This will be the content of the tab. '#content' => fedora_ilives_create_book_view($this->pid), ); - - $tabset['add_pages'] = array( - '#type' => 'tabpage', - '#title' => t('Add pages'), - '#content' => drupal_get_form('book_add_pages_form', $this->pid), - ); + + if (user_access('ingest new fedora objects')) { + $tabset['add_pages'] = array( + '#type' => 'tabpage', + '#title' => t('Add pages'), + '#content' => drupal_get_form('book_add_pages_form', $this->pid), + ); + } return $tabset; } }