You are here

class LocalActionAccessCheck in Apache Solr Multilingual 8

Checks access for displaying configuration translation page.

Hierarchy

Expanded class hierarchy of LocalActionAccessCheck

1 string reference to 'LocalActionAccessCheck'
apachesolr_multilingual.services.yml in ./apachesolr_multilingual.services.yml
apachesolr_multilingual.services.yml
1 service uses LocalActionAccessCheck
apachesolr_multilingual.local_action_access_check in ./apachesolr_multilingual.services.yml
Drupal\apachesolr_multilingual\Access\LocalActionAccessCheck

File

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

Namespace

Drupal\apachesolr_multilingual\Access
View source
class LocalActionAccessCheck implements AccessInterface {

  /**
   * A custom access check.
   *
   * @param \Drupal\Core\Session\AccountInterface $account
   *   Run access checks for this account.
   */
  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();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
LocalActionAccessCheck::access public function A custom access check.