You are here

private function TeamAppAccessHandler::processAccessResult in Apigee Edge 8

Processes access result before it gets returned.

Adds necessary cache tags to the access result object.

Parameters

\Drupal\Core\Access\AccessResultInterface $result: The access result to be altered if needed.

\Drupal\Core\Session\AccountInterface $account: The user for which to access check has happened.

1 call to TeamAppAccessHandler::processAccessResult()
TeamAppAccessHandler::checkAccess in modules/apigee_edge_teams/src/Entity/TeamAppAccessHandler.php
Performs access checks.

File

modules/apigee_edge_teams/src/Entity/TeamAppAccessHandler.php, line 215

Class

TeamAppAccessHandler
Access handler for Team App entities.

Namespace

Drupal\apigee_edge_teams\Entity

Code

private function processAccessResult(AccessResultInterface $result, AccountInterface $account) {

  // Ensure that access is re-evaluated when developer entity changes.
  if ($account
    ->isAuthenticated() && $result instanceof AccessResult) {
    $developer = $this->entityTypeManager
      ->getStorage('developer')
      ->load($account
      ->getEmail());
    if ($developer) {
      $result
        ->addCacheableDependency($developer);
    }
  }
}