diff --git a/modules/content/src/Plugin/Action/FieldUpdateActionBase.php b/modules/content/src/Plugin/Action/FieldUpdateActionBase.php index 04b40db895a0885d85b9893ac07d98272d680d80..45c9c98252055958591c5795deb1ed5e4ff9d99b 100644 --- a/modules/content/src/Plugin/Action/FieldUpdateActionBase.php +++ b/modules/content/src/Plugin/Action/FieldUpdateActionBase.php @@ -6,7 +6,7 @@ use Drupal\Component\Plugin\ConfigurableInterface; use Drupal\Component\Plugin\DependentPluginInterface; use Drupal\Core\Access\AccessResult; use Drupal\Core\Access\AccessResultInterface; -use Drupal\Core\Access\AccessibleInterface; +use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\FieldableEntityInterface; use Drupal\Core\Field\FieldItemListInterface; use Drupal\Core\Field\FieldStorageDefinitionInterface; @@ -482,11 +482,11 @@ abstract class FieldUpdateActionBase extends ActionBase implements ConfigurableI */ public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE): bool|AccessResultInterface { $result = AccessResult::forbidden(); - if (!($object instanceof AccessibleInterface)) { + if (!($object instanceof EntityInterface)) { + $result->setReason('No entity provided.'); return $return_as_object ? $result : $result->isAllowed(); } - /** @var \Drupal\Core\Entity\EntityInterface $entity */ $entity = $object; $entity_op = 'update';