Browse Source

Ensured that both namespace user permissions are checked

pull/105/head
Alan Stanley 14 years ago
parent
commit
ce049c0730
  1. 8
      ObjectHelper.inc

8
ObjectHelper.inc

@ -602,6 +602,7 @@ class ObjectHelper {
/*
* determines whether we can see the object or not
* checks PID namespace permissions, and user permissions
*/
function fedora_repository_access($op, $pid) {
@ -610,12 +611,12 @@ class ObjectHelper {
$returnValue = FALSE;
$isRestricted = variable_get('fedora_namespace_restriction_enforced', TRUE);
if (!$isRestricted) {
return TRUE;
$returnValue = TRUE;
}
if ($pid == NULL) {
$pid = variable_get('fedora_repository_pid', 'islandora:top');
}
$nameSpaceAllowed = explode(" ", variable_get('fedora_pids_allowed', 'default: demo: changeme: Islandora: ilives: '));
$nameSpaceAllowed = explode(" ", variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: '));
$pos = NULL;
foreach ($nameSpaceAllowed as $nameSpace) {
$pos = stripos($pid, $nameSpace);
@ -740,8 +741,7 @@ class ObjectHelper {
'/images/ingest.png" alt="' . t('Add a New Object') . '" class="icon"></a>' . t(' Add to this Collection');
}
}
}
else {
} else {
$ingestObject = '&nbsp;';
}

Loading…
Cancel
Save