|
|
@ -34,11 +34,10 @@ define('ISLANDORA_INGEST', 'ingest fedora objects'); |
|
|
|
define('ISLANDORA_PURGE', 'delete fedora objects and datastreams'); |
|
|
|
define('ISLANDORA_PURGE', 'delete fedora objects and datastreams'); |
|
|
|
define('ISLANDORA_MANAGE_PROPERTIES', 'manage object properties'); |
|
|
|
define('ISLANDORA_MANAGE_PROPERTIES', 'manage object properties'); |
|
|
|
define('ISLANDORA_VIEW_DATASTREAM_HISTORY', 'view old datastream versions'); |
|
|
|
define('ISLANDORA_VIEW_DATASTREAM_HISTORY', 'view old datastream versions'); |
|
|
|
define('ISLANDORA_ADD_NEW_DATASTREAM_VERSION', 'add a new datastream version as latest'); |
|
|
|
|
|
|
|
define('ISLANDORA_MANAGE_DELETED_OBJECTS', 'manage deleted objects'); |
|
|
|
define('ISLANDORA_MANAGE_DELETED_OBJECTS', 'manage deleted objects'); |
|
|
|
define('ISLANDORA_REVERT_DATASTREAM', 'revert to old datastream'); |
|
|
|
define('ISLANDORA_REVERT_DATASTREAM', 'revert to old datastream'); |
|
|
|
define('ISLANDORA_REGENERATE_DERIVATIVES', 'regenerate derivatives for an object'); |
|
|
|
define('ISLANDORA_REGENERATE_DERIVATIVES', 'regenerate derivatives for an object'); |
|
|
|
define('ISLANDORA_REPLACE_DATASTREAM', 'replace a datastream with new content, preserving version history'); |
|
|
|
define('ISLANDORA_REPLACE_DATASTREAM_CONTENT', 'replace a datastream with new content, preserving version history'); |
|
|
|
|
|
|
|
|
|
|
|
// Hooks. |
|
|
|
// Hooks. |
|
|
|
define('ISLANDORA_VIEW_HOOK', 'islandora_view_object'); |
|
|
|
define('ISLANDORA_VIEW_HOOK', 'islandora_view_object'); |
|
|
@ -325,7 +324,7 @@ function islandora_menu() { |
|
|
|
'file' => 'includes/datastream.version.inc', |
|
|
|
'file' => 'includes/datastream.version.inc', |
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
'access callback' => 'islandora_datastream_access', |
|
|
|
'access callback' => 'islandora_datastream_access', |
|
|
|
'access arguments' => array(ISLANDORA_ADD_NEW_DATASTREAM_VERSION, 4), |
|
|
|
'access arguments' => array(ISLANDORA_REPLACE_DATASTREAM_CONTENT, 4), |
|
|
|
'load arguments' => array(2), |
|
|
|
'load arguments' => array(2), |
|
|
|
); |
|
|
|
); |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/version/%/delete'] = array( |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/version/%/delete'] = array( |
|
|
@ -597,10 +596,6 @@ function islandora_permission() { |
|
|
|
'title' => t('View datastream history'), |
|
|
|
'title' => t('View datastream history'), |
|
|
|
'description' => t('View all previous versions of a datastream.'), |
|
|
|
'description' => t('View all previous versions of a datastream.'), |
|
|
|
), |
|
|
|
), |
|
|
|
ISLANDORA_ADD_NEW_DATASTREAM_VERSION => array( |
|
|
|
|
|
|
|
'title' => t('Add datastream version'), |
|
|
|
|
|
|
|
'description' => t('Add to a datastreams version history as latest.'), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
ISLANDORA_REVERT_DATASTREAM => array( |
|
|
|
ISLANDORA_REVERT_DATASTREAM => array( |
|
|
|
'title' => t('Revert datastream history'), |
|
|
|
'title' => t('Revert datastream history'), |
|
|
|
'description' => t('Revert to a previous version of a datastream.'), |
|
|
|
'description' => t('Revert to a previous version of a datastream.'), |
|
|
@ -613,7 +608,7 @@ function islandora_permission() { |
|
|
|
'title' => t('Regenerate derivatives'), |
|
|
|
'title' => t('Regenerate derivatives'), |
|
|
|
'description' => t('Regenerate derivatives for an object or per datastream.'), |
|
|
|
'description' => t('Regenerate derivatives for an object or per datastream.'), |
|
|
|
), |
|
|
|
), |
|
|
|
ISLANDORA_REPLACE_DATASTREAM => array( |
|
|
|
ISLANDORA_REPLACE_DATASTREAM_CONTENT => array( |
|
|
|
'title' => t('Replace derivatives'), |
|
|
|
'title' => t('Replace derivatives'), |
|
|
|
'description' => t('Replace derivatives for an object or per datastream.'), |
|
|
|
'description' => t('Replace derivatives for an object or per datastream.'), |
|
|
|
), |
|
|
|
), |
|
|
@ -722,6 +717,7 @@ function islandora_forms($form_id) { |
|
|
|
* otherwise. |
|
|
|
* otherwise. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function islandora_user_access($object_or_datastream, array $permissions, $content_models = array(), $access_any = TRUE, $user = NULL) { |
|
|
|
function islandora_user_access($object_or_datastream, array $permissions, $content_models = array(), $access_any = TRUE, $user = NULL) { |
|
|
|
|
|
|
|
|
|
|
|
module_load_include('inc', 'islandora', 'includes/utilities'); |
|
|
|
module_load_include('inc', 'islandora', 'includes/utilities'); |
|
|
|
$is_repository_accessible = &drupal_static(__FUNCTION__); |
|
|
|
$is_repository_accessible = &drupal_static(__FUNCTION__); |
|
|
|
|
|
|
|
|
|
|
|