From 0f71e2452c029c198636ed5183c264d382ca42dc Mon Sep 17 00:00:00 2001 From: Paul Pound Date: Fri, 25 May 2012 11:46:10 -0300 Subject: [PATCH] added new manage permission --- islandora.module | 9 ++++++++- .../islandora_basic_collection.module | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/islandora.module b/islandora.module index ffaf1025..22945983 100644 --- a/islandora.module +++ b/islandora.module @@ -22,13 +22,16 @@ */ - +//Permissions define('FEDORA_VIEW', 'view fedora repository'); define('FEDORA_METADATA_EDIT', 'edit fedora metadata'); define('FEDORA_ADD_DS', 'add fedora datastreams'); define('FEDORA_INGEST', 'ingest fedora objects'); define('FEDORA_PURGE', 'delete fedora objects and datastreams'); define('FEDORA_MODIFY_STATE', 'modify fedora state'); +define('FEDORA_MANAGE', 'manage fedora items'); + +//hooks define('ISLANDORA_VIEW_HOOK', 'islandora_view_object'); define('ISLANDORA_EDIT_HOOK', 'islandora_edit_object'); @@ -541,6 +544,10 @@ function islandora_permission() { 'title' => t('Change a Fedora objects state'), 'description' => t('Users with this permission will be allowed to change a Fedora objects state.') ), + FEDORA_MANAGE => array( + 'title' => t('View Fedora Manage tabs'), + 'description' => t('Users with this permission will be allowed to view fedora manage manage tabs.') + ) ); } diff --git a/islandora_basic_collection/islandora_basic_collection.module b/islandora_basic_collection/islandora_basic_collection.module index e2df410e..7432e527 100644 --- a/islandora_basic_collection/islandora_basic_collection.module +++ b/islandora_basic_collection/islandora_basic_collection.module @@ -94,7 +94,7 @@ function islandora_basic_collection_access($object_id) { $cmodel_list = islandora_basic_collection_islandora_get_types(); foreach ($fedora_object->models as $model) { if (isset($cmodel_list[$model])) { - return user_access(FEDORA_MODIFY_STATE); + return user_access(FEDORA_MANAGE); } } return FALSE;