You are here

function apachesolr_environment_delete_page_access in Apache Solr Search 8

Same name and namespace in other branches
  1. 6.3 apachesolr.module \apachesolr_environment_delete_page_access()
  2. 7 apachesolr.module \apachesolr_environment_delete_page_access()

Access callback for the delete page of an environment.

Parameters

$permission: The permission that you allow access to

$environment: The environment you want to delete. Core environment cannot be deleted

1 string reference to 'apachesolr_environment_delete_page_access'
apachesolr_menu in ./apachesolr.module
Implements hook_menu().

File

./apachesolr.module, line 1277
Integration with the Apache Solr search application.

Code

function apachesolr_environment_delete_page_access($permission, $environment) {
  $is_default = $environment['env_id'] == apachesolr_default_environment();
  if ($is_default && !user_access($permission)) {
    return FALSE;
  }
  return TRUE;
}