From 2c97efc8bbae4fe39fa42ab2bfa1c52d12a52482 Mon Sep 17 00:00:00 2001 From: Alejandro Cabarcos Date: Wed, 27 Sep 2023 08:36:55 +0200 Subject: [PATCH] Issue #166: Specific access checking on getLastEntityId --- 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 3e3c493..a4841fc 100644 --- a/src/Behat/Cores/Drupal8.php +++ b/src/Behat/Cores/Drupal8.php @@ -225,6 +225,7 @@ public function getLastEntityId($entity_type, $bundle = NULL) { $query->sort($id_key, 'DESC'); $query->range(0, 1); $query->addMetaData('account', \Drupal::entityTypeManager()->getStorage('user')->load(1)); + $query->accessCheck(FALSE); $results = $query->execute(); if (!empty($results)) {