diff --git a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php index 85ef357..4535abe 100644 --- a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php +++ b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php @@ -75,6 +75,18 @@ class EntityType extends Plugin { ); /** + * The name of the default administrative permission. + * + * The default \Drupal\Core\Entity\EntityAccessController class checks this + * permission for all operations in its checkAccess() method. Entities with + * more complex permissions can extend this class to do their own access + * checks. + * + * @var string (optional) + */ + public $admin_permission; + + /** * Boolean indicating whether fields can be attached to entities of this type. * * @var bool (optional) diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlockType.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlockType.php index 4fa8439..86131a4 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlockType.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlockType.php @@ -22,7 +22,6 @@ * module = "custom_block", * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", - * "access" = "Drupal\Core\Entity\EntityAccessController", * "form" = { * "default" = "Drupal\custom_block\CustomBlockTypeFormController", * "add" = "Drupal\custom_block\CustomBlockTypeFormController", diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php index c0b1c6c..1ac34da 100644 --- a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php +++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php @@ -35,7 +35,6 @@ * module = "entity", * controllers = { * "list" = "Drupal\entity\EntityFormModeListController", - * "access" = "Drupal\Core\Entity\EntityAccessController", * "form" = { * "add" = "Drupal\entity\Form\EntityFormModeAddForm", * "edit" = "Drupal\entity\Form\EntityDisplayModeEditForm", diff --git a/core/modules/system/lib/Drupal/system/Entity/Action.php b/core/modules/system/lib/Drupal/system/Entity/Action.php index 5192858..e2e7650 100644 --- a/core/modules/system/lib/Drupal/system/Entity/Action.php +++ b/core/modules/system/lib/Drupal/system/Entity/Action.php @@ -24,7 +24,6 @@ * module = "system", * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", - * "access" = "Drupal\Core\Entity\EntityAccessController" * }, * admin_permission = "administer actions", * config_prefix = "system.action",