Skip to content

Commit

Permalink
Merge pull request #167 from Furyhuntardita/master
Browse files Browse the repository at this point in the history
Issue #166: Specific access checking on getLastEntityId
  • Loading branch information
omarlopesino authored Sep 27, 2023
2 parents 504fefe + 2c97efc commit d175b18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Behat/Cores/Drupal8.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit d175b18

Please sign in to comment.