public function LocalActionAccessCheck::access in Search API Multilingual Solr Search 8
A custom access check.
Parameters
\Drupal\Core\Session\AccountInterface $account: Run access checks for this account.
File
- src/
Access/ LocalActionAccessCheck.php, line 22
Class
- LocalActionAccessCheck
- Checks access for displaying Solr configuration generator actions.
Namespace
Drupal\search_api_solr_multilingual\AccessCode
public function access(AccountInterface $account, ServerInterface $search_api_server = NULL) {
if ($search_api_server && $search_api_server
->getBackend() instanceof AbstractSearchApiSolrMultilingualBackend) {
return AccessResult::allowed();
}
return AccessResult::forbidden();
}