hasPermission('view any webform submission')) { return AccessResult::allowed(); } /** @var \Drupal\webform\WebformSubmissionInterface $entity */ $webform = $entity->getWebform(); if ($webform->access('update') || $webform->checkAccessRules($operation, $account, $entity)) { return AccessResult::allowed(); } return parent::checkAccess($entity, $operation, $account); } }