@ -962,7 +962,7 @@ function makeObject($pid, $dsID) {
return ' ';
return ' ';
}
}
global $user, $conf;
global $user, $conf;
if (!fedora_repository_check_perm(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user, TRUE, $dsID)) {
if (!fedora_repository_check_perm(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user, FALSE, $dsID)) {
drupal_access_denied();
drupal_access_denied();
return;
return;
drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace."), 'error');
drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace."), 'error');
@ -1109,7 +1109,7 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
drupal_set_message(t("Invalid dsID!"), 'error');
drupal_set_message(t("Invalid dsID!"), 'error');
return ' ';
return ' ';
}
}
if (!fedora_repository_check_perm(OBJECTHELPER::$OBJECT_HELPER_VIEW_FEDORA, $pid, $user, TRUE, $dsId)) {
if (!fedora_repository_check_perm(OBJECTHELPER::$OBJECT_HELPER_VIEW_FEDORA, $pid, $user, FALSE, $dsId)) {
if (user_access('access administration pages')) {
if (user_access('access administration pages')) {
drupal_set_message(t("PIDs may be added to allowed namespaces, or all namespace restrictions removed !here", array('!here' => l('here', 'admin/settings/fedora_repository'))), 'warning');
drupal_set_message(t("PIDs may be added to allowed namespaces, or all namespace restrictions removed !here", array('!here' => l('here', 'admin/settings/fedora_repository'))), 'warning');
}
}
@ -1698,6 +1698,8 @@ function fedora_repository_access() {
* An account to check the permission on, or NULL to use the current user.
* An account to check the permission on, or NULL to use the current user.
* @param boolean $reset_cache
* @param boolean $reset_cache
* A boolean to reset the static cache, if required in long-running processes.
* A boolean to reset the static cache, if required in long-running processes.
* @param string|null $dsid
* A dsid to check, or NULL to use object level check.
*
*
* @return boolean
* @return boolean
* A boolean indicating if the operation should be permitted (TRUE) or denied
* A boolean indicating if the operation should be permitted (TRUE) or denied