hasPermission($this->entityType->getAdminPermission())) { return AccessResult::allowed()->cachePerPermissions(); } switch ($operation) { case 'view': return AccessResult::allowedIfHasPermission($account, 'view fixity checks')->cachePerPermissions(); default: return AccessResult::forbidden()->cachePerPermissions(); } } /** * {@inheritdoc} */ protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) { return AccessResult::allowedIfHasPermission($account, $this->entityType->getAdminPermission()); } }