You are here

function search_api_access_disable_page in Search API 7

Determines whether the current user can disable a server or index.

Parameters

Entity $entity: The server or index for which the access to the "disable" page is checked.

Return value

bool TRUE if the "disable" page can be accessed by the user, FALSE otherwise.

1 string reference to 'search_api_access_disable_page'
search_api_menu in ./search_api.module
Implements hook_menu().

File

./search_api.module, line 2671
Provides a flexible framework for implementing search services.

Code

function search_api_access_disable_page(Entity $entity) {
  return user_access('administer search_api') && !empty($entity->enabled);
}