You are here

public function LocalActionAccessCheck::access in Apache Solr Multilingual 8

A custom access check.

Parameters

\Drupal\Core\Session\AccountInterface $account: Run access checks for this account.

File

src/Access/LocalActionAccessCheck.php, line 26
Contains \Drupal\example\Access\CustomAccessCheck.

Class

LocalActionAccessCheck
Checks access for displaying configuration translation page.

Namespace

Drupal\apachesolr_multilingual\Access

Code

public function access(AccountInterface $account, ServerInterface $search_api_server = NULL) {
  if ($search_api_server && $search_api_server
    ->getBackend() instanceof SearchApiSolrMultilingualBackend) {
    return AccessResult::allowed();
  }
  return AccessResult::forbidden();
}