You are here

function apachesolr_environment_delete_page_access in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 apachesolr.module \apachesolr_environment_delete_page_access()
  2. 6.3 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 1288
Integration with the Apache Solr search application.

Code

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