|
|
@ -501,9 +501,13 @@ class formClass { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function canShowIngestForm($collection_pid) { |
|
|
|
function canShowIngestForm($collection_pid) { |
|
|
|
if (!user_access('ingest new fedora objects')) { |
|
|
|
if (!user_access('ingest new fedora objects')) { |
|
|
|
|
|
|
|
$ingest_override_array = module_invoke_all('fedora_repository_can_ingest', $collection_pid); |
|
|
|
|
|
|
|
$overrides = array_filter($ingest_override_array); |
|
|
|
|
|
|
|
if (empty($overrides)) { |
|
|
|
drupal_set_message(t('You do not have permission to ingest.'), 'error'); |
|
|
|
drupal_set_message(t('You do not have permission to ingest.'), 'error'); |
|
|
|
return FALSE; |
|
|
|
return FALSE; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
module_load_include('inc', 'fedora_repository', 'SecurityClass'); |
|
|
|
module_load_include('inc', 'fedora_repository', 'SecurityClass'); |
|
|
|
$security_class = new SecurityClass(); |
|
|
|
$security_class = new SecurityClass(); |
|
|
|
if (!$security_class->canIngestHere($collection_pid)) { |
|
|
|
if (!$security_class->canIngestHere($collection_pid)) { |
|
|
|