|
|
@ -24,15 +24,15 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
// Common datastreams. |
|
|
|
// Common datastreams. |
|
|
|
define('DS_COMP_STREAM', 'DS-COMPOSITE-MODEL'); |
|
|
|
define('ISLANDORA_DS_COMP_STREAM', 'DS-COMPOSITE-MODEL'); |
|
|
|
|
|
|
|
|
|
|
|
// Permissions. |
|
|
|
// Permissions. |
|
|
|
define('FEDORA_VIEW_OBJECTS', 'view fedora repository objects'); |
|
|
|
define('ISLANDORA_VIEW_OBJECTS', 'view fedora repository objects'); |
|
|
|
define('FEDORA_METADATA_EDIT', 'edit fedora metadata'); |
|
|
|
define('ISLANDORA_METADATA_EDIT', 'edit fedora metadata'); |
|
|
|
define('FEDORA_ADD_DS', 'add fedora datastreams'); |
|
|
|
define('ISLANDORA_ADD_DS', 'add fedora datastreams'); |
|
|
|
define('FEDORA_INGEST', 'ingest fedora objects'); |
|
|
|
define('ISLANDORA_INGEST', 'ingest fedora objects'); |
|
|
|
define('FEDORA_PURGE', 'delete fedora objects and datastreams'); |
|
|
|
define('ISLANDORA_PURGE', 'delete fedora objects and datastreams'); |
|
|
|
define('FEDORA_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'); |
|
|
|
|
|
|
|
|
|
|
|
// Hooks. |
|
|
|
// Hooks. |
|
|
@ -57,6 +57,19 @@ define('ISLANDORA_INGEST_STEP_HOOK', 'islandora_ingest_steps'); |
|
|
|
// Autocomplete paths. |
|
|
|
// Autocomplete paths. |
|
|
|
define('ISLANDORA_CONTENT_MODELS_AUTOCOMPLETE', 'islandora/autocomplete/content-models'); |
|
|
|
define('ISLANDORA_CONTENT_MODELS_AUTOCOMPLETE', 'islandora/autocomplete/content-models'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @deprecated Constants. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
// @codingStandardsIgnoreStart |
|
|
|
|
|
|
|
define('DS_COMP_STREAM', ISLANDORA_DS_COMP_STREAM); |
|
|
|
|
|
|
|
define('FEDORA_VIEW_OBJECTS', ISLANDORA_VIEW_OBJECTS); |
|
|
|
|
|
|
|
define('FEDORA_METADATA_EDIT', ISLANDORA_METADATA_EDIT); |
|
|
|
|
|
|
|
define('FEDORA_ADD_DS', ISLANDORA_ADD_DS); |
|
|
|
|
|
|
|
define('FEDORA_INGEST', ISLANDORA_INGEST); |
|
|
|
|
|
|
|
define('FEDORA_PURGE', ISLANDORA_PURGE); |
|
|
|
|
|
|
|
define('FEDORA_MANAGE_PROPERTIES', ISLANDORA_MANAGE_PROPERTIES); |
|
|
|
|
|
|
|
// @codingStandardsIgnoreEnd |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Implements hook_menu(). |
|
|
|
* Implements hook_menu(). |
|
|
|
* |
|
|
|
* |
|
|
@ -85,7 +98,7 @@ function islandora_menu() { |
|
|
|
'title' => 'Solution packs', |
|
|
|
'title' => 'Solution packs', |
|
|
|
'description' => 'Install content models and collections required by installed solution packs.', |
|
|
|
'description' => 'Install content models and collections required by installed solution packs.', |
|
|
|
'page callback' => 'islandora_solution_packs_admin', |
|
|
|
'page callback' => 'islandora_solution_packs_admin', |
|
|
|
'access arguments' => array(FEDORA_ADD_DS), |
|
|
|
'access arguments' => array(ISLANDORA_ADD_DS), |
|
|
|
'file' => 'includes/solution_packs.inc', |
|
|
|
'file' => 'includes/solution_packs.inc', |
|
|
|
'type' => MENU_NORMAL_ITEM, |
|
|
|
'type' => MENU_NORMAL_ITEM, |
|
|
|
); |
|
|
|
); |
|
|
@ -93,7 +106,7 @@ function islandora_menu() { |
|
|
|
'title' => 'Islandora Repository', |
|
|
|
'title' => 'Islandora Repository', |
|
|
|
'page callback' => 'islandora_view_default_object', |
|
|
|
'page callback' => 'islandora_view_default_object', |
|
|
|
'type' => MENU_NORMAL_ITEM, |
|
|
|
'type' => MENU_NORMAL_ITEM, |
|
|
|
'access arguments' => array(FEDORA_VIEW_OBJECTS), |
|
|
|
'access arguments' => array(ISLANDORA_VIEW_OBJECTS), |
|
|
|
); |
|
|
|
); |
|
|
|
$items['islandora/object/%islandora_object'] = array( |
|
|
|
$items['islandora/object/%islandora_object'] = array( |
|
|
|
'title callback' => 'islandora_drupal_title', |
|
|
|
'title callback' => 'islandora_drupal_title', |
|
|
@ -102,14 +115,14 @@ function islandora_menu() { |
|
|
|
'page arguments' => array(2), |
|
|
|
'page arguments' => array(2), |
|
|
|
'type' => MENU_NORMAL_ITEM, |
|
|
|
'type' => MENU_NORMAL_ITEM, |
|
|
|
'access callback' => 'islandora_object_access_callback', |
|
|
|
'access callback' => 'islandora_object_access_callback', |
|
|
|
'access arguments' => array(FEDORA_VIEW_OBJECTS, 2), |
|
|
|
'access arguments' => array(ISLANDORA_VIEW_OBJECTS, 2), |
|
|
|
); |
|
|
|
); |
|
|
|
$items['islandora/object/%islandora_object/print'] = array( |
|
|
|
$items['islandora/object/%islandora_object/print'] = array( |
|
|
|
'page callback' => 'islandora_printer_object', |
|
|
|
'page callback' => 'islandora_printer_object', |
|
|
|
'page arguments' => array(2), |
|
|
|
'page arguments' => array(2), |
|
|
|
'type' => MENU_NORMAL_ITEM, |
|
|
|
'type' => MENU_NORMAL_ITEM, |
|
|
|
'access callback' => 'islandora_object_access_callback', |
|
|
|
'access callback' => 'islandora_object_access_callback', |
|
|
|
'access arguments' => array(FEDORA_VIEW_OBJECTS, 2), |
|
|
|
'access arguments' => array(ISLANDORA_VIEW_OBJECTS, 2), |
|
|
|
); |
|
|
|
); |
|
|
|
$items['islandora/object/%islandora_object/view'] = array( |
|
|
|
$items['islandora/object/%islandora_object/view'] = array( |
|
|
|
'title' => 'View', |
|
|
|
'title' => 'View', |
|
|
@ -129,11 +142,11 @@ function islandora_menu() { |
|
|
|
'access callback' => 'islandora_object_manage_access_callback', |
|
|
|
'access callback' => 'islandora_object_manage_access_callback', |
|
|
|
'access arguments' => array( |
|
|
|
'access arguments' => array( |
|
|
|
array( |
|
|
|
array( |
|
|
|
FEDORA_MANAGE_PROPERTIES, |
|
|
|
ISLANDORA_MANAGE_PROPERTIES, |
|
|
|
FEDORA_METADATA_EDIT, |
|
|
|
ISLANDORA_METADATA_EDIT, |
|
|
|
FEDORA_ADD_DS, |
|
|
|
ISLANDORA_ADD_DS, |
|
|
|
FEDORA_PURGE, |
|
|
|
ISLANDORA_PURGE, |
|
|
|
FEDORA_INGEST, |
|
|
|
ISLANDORA_INGEST, |
|
|
|
), 2), |
|
|
|
), 2), |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
@ -151,9 +164,9 @@ function islandora_menu() { |
|
|
|
'access callback' => 'islandora_object_manage_access_callback', |
|
|
|
'access callback' => 'islandora_object_manage_access_callback', |
|
|
|
'access arguments' => array( |
|
|
|
'access arguments' => array( |
|
|
|
array( |
|
|
|
array( |
|
|
|
FEDORA_METADATA_EDIT, |
|
|
|
ISLANDORA_METADATA_EDIT, |
|
|
|
FEDORA_ADD_DS, |
|
|
|
ISLANDORA_ADD_DS, |
|
|
|
FEDORA_PURGE, |
|
|
|
ISLANDORA_PURGE, |
|
|
|
), 2), |
|
|
|
), 2), |
|
|
|
'weight' => -10, |
|
|
|
'weight' => -10, |
|
|
|
); |
|
|
|
); |
|
|
@ -165,7 +178,7 @@ function islandora_menu() { |
|
|
|
'page arguments' => array('islandora_object_properties_form', 2), |
|
|
|
'page arguments' => array('islandora_object_properties_form', 2), |
|
|
|
'type' => MENU_LOCAL_TASK, |
|
|
|
'type' => MENU_LOCAL_TASK, |
|
|
|
'access callback' => 'islandora_object_access_callback', |
|
|
|
'access callback' => 'islandora_object_access_callback', |
|
|
|
'access arguments' => array(FEDORA_MANAGE_PROPERTIES, 2), |
|
|
|
'access arguments' => array(ISLANDORA_MANAGE_PROPERTIES, 2), |
|
|
|
'weight' => -5, |
|
|
|
'weight' => -5, |
|
|
|
); |
|
|
|
); |
|
|
|
$items['islandora/object/%islandora_object/delete'] = array( |
|
|
|
$items['islandora/object/%islandora_object/delete'] = array( |
|
|
@ -175,7 +188,7 @@ function islandora_menu() { |
|
|
|
'page arguments' => array('islandora_delete_object_form', 2), |
|
|
|
'page arguments' => array('islandora_delete_object_form', 2), |
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
'access callback' => 'islandora_object_access_callback', |
|
|
|
'access callback' => 'islandora_object_access_callback', |
|
|
|
'access arguments' => array(FEDORA_PURGE, 2), |
|
|
|
'access arguments' => array(ISLANDORA_PURGE, 2), |
|
|
|
); |
|
|
|
); |
|
|
|
$items['islandora/object/%islandora_object/manage/datastreams/add'] = array( |
|
|
|
$items['islandora/object/%islandora_object/manage/datastreams/add'] = array( |
|
|
|
'title' => 'Add a datastream', |
|
|
|
'title' => 'Add a datastream', |
|
|
@ -184,7 +197,7 @@ function islandora_menu() { |
|
|
|
'page arguments' => array('islandora_add_datastream_form', 2), |
|
|
|
'page arguments' => array('islandora_add_datastream_form', 2), |
|
|
|
'type' => MENU_LOCAL_ACTION, |
|
|
|
'type' => MENU_LOCAL_ACTION, |
|
|
|
'access callback' => 'islandora_object_access_callback', |
|
|
|
'access callback' => 'islandora_object_access_callback', |
|
|
|
'access arguments' => array(FEDORA_ADD_DS, 2), |
|
|
|
'access arguments' => array(ISLANDORA_ADD_DS, 2), |
|
|
|
); |
|
|
|
); |
|
|
|
$items['islandora/object/%islandora_object/manage/datastreams/add/autocomplete'] = array( |
|
|
|
$items['islandora/object/%islandora_object/manage/datastreams/add/autocomplete'] = array( |
|
|
|
'file' => 'includes/add_datastream.form.inc', |
|
|
|
'file' => 'includes/add_datastream.form.inc', |
|
|
@ -192,7 +205,7 @@ function islandora_menu() { |
|
|
|
'page arguments' => array(2), |
|
|
|
'page arguments' => array(2), |
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
'access callback' => 'islandora_object_access_callback', |
|
|
|
'access callback' => 'islandora_object_access_callback', |
|
|
|
'access arguments' => array(FEDORA_ADD_DS, 2), |
|
|
|
'access arguments' => array(ISLANDORA_ADD_DS, 2), |
|
|
|
); |
|
|
|
); |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream'] = array( |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream'] = array( |
|
|
|
'title' => 'View datastream', |
|
|
|
'title' => 'View datastream', |
|
|
@ -201,7 +214,7 @@ function islandora_menu() { |
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
'file' => 'includes/datastream.inc', |
|
|
|
'file' => 'includes/datastream.inc', |
|
|
|
'access callback' => 'islandora_datastream_access', |
|
|
|
'access callback' => 'islandora_datastream_access', |
|
|
|
'access arguments' => array(FEDORA_VIEW_OBJECTS, 4), |
|
|
|
'access arguments' => array(ISLANDORA_VIEW_OBJECTS, 4), |
|
|
|
'load arguments' => array(2), |
|
|
|
'load arguments' => array(2), |
|
|
|
); |
|
|
|
); |
|
|
|
// This menu item uses token authentication in islandora_tokened_object. |
|
|
|
// This menu item uses token authentication in islandora_tokened_object. |
|
|
@ -209,7 +222,7 @@ function islandora_menu() { |
|
|
|
'title' => 'View datastream', |
|
|
|
'title' => 'View datastream', |
|
|
|
'load arguments' => array('%map'), |
|
|
|
'load arguments' => array('%map'), |
|
|
|
'access callback' => 'islandora_object_datastream_tokened_access_callback', |
|
|
|
'access callback' => 'islandora_object_datastream_tokened_access_callback', |
|
|
|
'access arguments' => array(FEDORA_VIEW_OBJECTS, 2, 4), |
|
|
|
'access arguments' => array(ISLANDORA_VIEW_OBJECTS, 2, 4), |
|
|
|
'type' => MENU_DEFAULT_LOCAL_TASK, |
|
|
|
'type' => MENU_DEFAULT_LOCAL_TASK, |
|
|
|
); |
|
|
|
); |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/download'] = array( |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/download'] = array( |
|
|
@ -219,7 +232,7 @@ function islandora_menu() { |
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
'file' => 'includes/datastream.inc', |
|
|
|
'file' => 'includes/datastream.inc', |
|
|
|
'access callback' => 'islandora_datastream_access', |
|
|
|
'access callback' => 'islandora_datastream_access', |
|
|
|
'access arguments' => array(FEDORA_VIEW_OBJECTS, 4), |
|
|
|
'access arguments' => array(ISLANDORA_VIEW_OBJECTS, 4), |
|
|
|
'load arguments' => array(2), |
|
|
|
'load arguments' => array(2), |
|
|
|
); |
|
|
|
); |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/edit'] = array( |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/edit'] = array( |
|
|
@ -229,7 +242,7 @@ function islandora_menu() { |
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
'file' => 'includes/datastream.inc', |
|
|
|
'file' => 'includes/datastream.inc', |
|
|
|
'access callback' => 'islandora_datastream_access', |
|
|
|
'access callback' => 'islandora_datastream_access', |
|
|
|
'access arguments' => array(FEDORA_METADATA_EDIT, 4), |
|
|
|
'access arguments' => array(ISLANDORA_METADATA_EDIT, 4), |
|
|
|
'load arguments' => array(2), |
|
|
|
'load arguments' => array(2), |
|
|
|
); |
|
|
|
); |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/delete'] = array( |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/delete'] = array( |
|
|
@ -239,7 +252,7 @@ function islandora_menu() { |
|
|
|
'file' => 'includes/delete_datastream.form.inc', |
|
|
|
'file' => 'includes/delete_datastream.form.inc', |
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
'access callback' => 'islandora_datastream_access', |
|
|
|
'access callback' => 'islandora_datastream_access', |
|
|
|
'access arguments' => array(FEDORA_PURGE, 4), |
|
|
|
'access arguments' => array(ISLANDORA_PURGE, 4), |
|
|
|
'load arguments' => array(2), |
|
|
|
'load arguments' => array(2), |
|
|
|
); |
|
|
|
); |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/version'] = array( |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/version'] = array( |
|
|
@ -259,7 +272,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(FEDORA_PURGE, 4), |
|
|
|
'access arguments' => array(ISLANDORA_PURGE, 4), |
|
|
|
'load arguments' => array(2), |
|
|
|
'load arguments' => array(2), |
|
|
|
); |
|
|
|
); |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/version/%/view'] = array( |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/version/%/view'] = array( |
|
|
@ -277,7 +290,7 @@ function islandora_menu() { |
|
|
|
'page arguments' => array(2), |
|
|
|
'page arguments' => array(2), |
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
'access callback' => 'islandora_object_access', |
|
|
|
'access callback' => 'islandora_object_access', |
|
|
|
'access arguments' => array(FEDORA_VIEW_OBJECTS, 2), |
|
|
|
'access arguments' => array(ISLANDORA_VIEW_OBJECTS, 2), |
|
|
|
'load arguments' => array(2), |
|
|
|
'load arguments' => array(2), |
|
|
|
); |
|
|
|
); |
|
|
|
$items[ISLANDORA_CONTENT_MODELS_AUTOCOMPLETE] = array( |
|
|
|
$items[ISLANDORA_CONTENT_MODELS_AUTOCOMPLETE] = array( |
|
|
@ -390,27 +403,27 @@ function islandora_theme() { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function islandora_permission() { |
|
|
|
function islandora_permission() { |
|
|
|
return array( |
|
|
|
return array( |
|
|
|
FEDORA_VIEW_OBJECTS => array( |
|
|
|
ISLANDORA_VIEW_OBJECTS => array( |
|
|
|
'title' => t('View repository objects'), |
|
|
|
'title' => t('View repository objects'), |
|
|
|
'description' => t('View objects in the repository. Note: Fedora XACML security policies may override this permission.'), |
|
|
|
'description' => t('View objects in the repository. Note: Fedora XACML security policies may override this permission.'), |
|
|
|
), |
|
|
|
), |
|
|
|
FEDORA_ADD_DS => array( |
|
|
|
ISLANDORA_ADD_DS => array( |
|
|
|
'title' => t('Add datastreams to repository objects'), |
|
|
|
'title' => t('Add datastreams to repository objects'), |
|
|
|
'description' => t('Add datastreams to objects in the repository. Note: Fedora XACML security policies may override this position.'), |
|
|
|
'description' => t('Add datastreams to objects in the repository. Note: Fedora XACML security policies may override this position.'), |
|
|
|
), |
|
|
|
), |
|
|
|
FEDORA_METADATA_EDIT => array( |
|
|
|
ISLANDORA_METADATA_EDIT => array( |
|
|
|
'title' => t('Edit metadata'), |
|
|
|
'title' => t('Edit metadata'), |
|
|
|
'description' => t('Edit metadata for objects in the repository.'), |
|
|
|
'description' => t('Edit metadata for objects in the repository.'), |
|
|
|
), |
|
|
|
), |
|
|
|
FEDORA_INGEST => array( |
|
|
|
ISLANDORA_INGEST => array( |
|
|
|
'title' => t('Create new repository objects'), |
|
|
|
'title' => t('Create new repository objects'), |
|
|
|
'description' => t('Create new objects in the repository.'), |
|
|
|
'description' => t('Create new objects in the repository.'), |
|
|
|
), |
|
|
|
), |
|
|
|
FEDORA_PURGE => array( |
|
|
|
ISLANDORA_PURGE => array( |
|
|
|
'title' => t('Permanently remove objects from the repository'), |
|
|
|
'title' => t('Permanently remove objects from the repository'), |
|
|
|
'description' => t('Permanently remove objects from the repository.'), |
|
|
|
'description' => t('Permanently remove objects from the repository.'), |
|
|
|
), |
|
|
|
), |
|
|
|
FEDORA_MANAGE_PROPERTIES => array( |
|
|
|
ISLANDORA_MANAGE_PROPERTIES => array( |
|
|
|
'title' => t('Manage object properties'), |
|
|
|
'title' => t('Manage object properties'), |
|
|
|
'description' => t('Modify object labels, owner IDs, and states.'), |
|
|
|
'description' => t('Modify object labels, owner IDs, and states.'), |
|
|
|
), |
|
|
|
), |
|
|
|