From 7f7a41baecdc1f4bdde365fb1659337864fa2676 Mon Sep 17 00:00:00 2001 From: Omar Date: Wed, 27 Sep 2023 10:49:51 +0200 Subject: [PATCH] Check access loading latest entity by properties --- src/Behat/Cores/Drupal8.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Behat/Cores/Drupal8.php b/src/Behat/Cores/Drupal8.php index a4841fc..5afbdfe 100644 --- a/src/Behat/Cores/Drupal8.php +++ b/src/Behat/Cores/Drupal8.php @@ -187,6 +187,7 @@ public function loadLatestEntity(string $entity_type) { public function loadLatestEntityByProperties(string $entity_type, array $properties = []) { $storage = \Drupal::entityTypeManager()->getStorage($entity_type); $query = $storage->getQuery(); + $query->accessCheck(FALSE); foreach ($properties as $property => $value) { $query->condition($property, $value);