Backup of db before drupal security update
[yaffs-website] / web / core / modules / block_content / src / BlockContentAccessControlHandler.php
1 <?php
2
3 namespace Drupal\block_content;
4
5 use Drupal\Core\Access\AccessResult;
6 use Drupal\Core\Entity\EntityInterface;
7 use Drupal\Core\Entity\EntityAccessControlHandler;
8 use Drupal\Core\Session\AccountInterface;
9
10 /**
11  * Defines the access control handler for the custom block entity type.
12  *
13  * @see \Drupal\block_content\Entity\BlockContent
14  */
15 class BlockContentAccessControlHandler extends EntityAccessControlHandler {
16
17   /**
18    * {@inheritdoc}
19    */
20   protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
21     if ($operation === 'view') {
22       return AccessResult::allowed();
23     }
24     return parent::checkAccess($entity, $operation, $account);
25   }
26
27 }