You are here

function acquia_search_environment_delete_access in Acquia Connector 7.3

Same name and namespace in other branches
  1. 7 acquia_search/acquia_search.module \acquia_search_environment_delete_access()
  2. 7.2 acquia_search/acquia_search.module \acquia_search_environment_delete_access()

Delete environment page access.

1 call to acquia_search_environment_delete_access()
AcquiaSearchWebTestCase::testDeleteSearchEnvironmentAccess in acquia_search/tests/acquia_search.test
Tests that user have no access to delete search environment.
1 string reference to 'acquia_search_environment_delete_access'
acquia_search_menu_alter in acquia_search/acquia_search.module
Implements hook_menu_alter().

File

acquia_search/acquia_search.module, line 436
Integration between Acquia Drupal and Acquia's hosted solr search service.

Code

function acquia_search_environment_delete_access($environment) {
  if (empty($environment['env_id'])) {
    return FALSE;
  }
  if ($environment['env_id'] === ACQUIA_SEARCH_V3_ENVIRONMENT_ID || $environment['env_id'] === ACQUIA_SEARCH_ENVIRONMENT_ID) {
    return FALSE;
  }

  // Fall back to the original check.
  return user_access('administer search');
}