diff --git a/includes/admin.form.inc b/includes/admin.form.inc index f4db785b..a1f22652 100644 --- a/includes/admin.form.inc +++ b/includes/admin.form.inc @@ -108,13 +108,6 @@ function islandora_repository_admin(array $form, array &$form_state) { '#required' => TRUE, ); - $form['islandora_tabs']['islandora_general']['islandora_strict_user_access_enforcement'] = array( - '#type' => 'checkbox', - '#title' => t('Strict User Access Enforcement'), - '#description' => t('Restrict permissions to the result of user_access(); other modules will be able to deny things, but other modules will not be able to allow operations not allowed via Drupal permissions.'), - '#default_value' => variable_get('islandora_strict_user_access_enforcement', TRUE), - ); - $form['islandora_tabs']['islandora_namespace'] = array( '#type' => 'fieldset', '#title' => t('Namespaces'), diff --git a/islandora.module b/islandora.module index 88664bd1..58a23a10 100644 --- a/islandora.module +++ b/islandora.module @@ -1205,28 +1205,13 @@ function islandora_object_access($op, $object, $user = NULL) { /** * Implements hook_islandora_object_access(). * - * Denies according to PID namespace restrictions, passes according to - * user_access(), and makes no indication if namespace restrictions passed but - * user_access() returned a fail, to allow other modules to allow an operation. + * Denies according to PID namespace restrictions, then passes or denies + * according to core Drupal permissions according to user_access(). */ function islandora_islandora_object_access($op, $object, $user) { module_load_include('inc', 'islandora', 'includes/utilities'); - $to_return = islandora_namespace_accessible($object->id); - $user_access_result = user_access($op, $user); - - if ($to_return && $user_access_result) { - // Straight Drupal permissions, let's allow it. - return TRUE; - } - elseif ($to_return === FALSE || (variable_get('islandora_strict_user_access_enforcement', TRUE) && !$user_access_result)) { - // PID namespace is outside of those allowed. Forbid! - return FALSE; - } - else { - // Neither allowing of forbidding, to allow other modules to override. - return NULL; - } + return islandora_namespace_accessible($object->id) && user_access($op, $user); } /**