You are here

public function SendinblueController::accessToSsoSib in SendinBlue 8

Same name and namespace in other branches
  1. 8.2 src/Controller/SendinblueController.php \Drupal\sendinblue\Controller\SendinblueController::accessToSsoSib()

Checks access for a specific request.

Parameters

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

1 string reference to 'SendinblueController::accessToSsoSib'
sendinblue.routing.yml in ./sendinblue.routing.yml
sendinblue.routing.yml

File

src/Controller/SendinblueController.php, line 57

Class

SendinblueController
Returns responses for entity browser routes.

Namespace

Drupal\sendinblue\Controller

Code

public function accessToSsoSib(AccountInterface $account) {
  $apiVersion = $this->sendinblueManager
    ->getApiVersion($this->sendinblueManager
    ->getAccessKey());
  return AccessResult::allowedIf($this->sendinblueManager
    ->isLoggedInState())
    ->andIf(AccessResult::allowedIf($apiVersion === SendinblueManager::SENDINBLUE_API_VERSION_V2));
}