Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / config / tests / config_test / src / ConfigTestAccessControlHandler.php
1 <?php
2
3 namespace Drupal\config_test;
4
5 use Drupal\Core\Access\AccessResult;
6 use Drupal\Core\Session\AccountInterface;
7 use Drupal\Core\Entity\EntityAccessControlHandler;
8 use Drupal\Core\Entity\EntityInterface;
9
10 /**
11  * Defines the access control handler for the config_test entity type.
12  *
13  * @see \Drupal\config_test\Entity\ConfigTest
14  */
15 class ConfigTestAccessControlHandler extends EntityAccessControlHandler {
16
17   /**
18    * {@inheritdoc}
19    */
20   public function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
21     return AccessResult::allowed();
22   }
23
24   /**
25    * {@inheritdoc}
26    */
27   protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
28     return AccessResult::allowed();
29   }
30
31 }