Skip to content

Commit

Permalink
Check access loading latest entity by properties
Browse files Browse the repository at this point in the history
  • Loading branch information
omarlopesino committed Sep 27, 2023
1 parent d175b18 commit 7f7a41b
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 @@ -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);
Expand Down

0 comments on commit 7f7a41b

Please sign in to comment.