From 337b9182c89cb43efec16cef417cdf72a5fc76d1 Mon Sep 17 00:00:00 2001 From: Moshe Weitzman Date: Mon, 31 Jan 2022 14:00:46 -0500 Subject: [PATCH] Fix #5058. Load/delete entities that are access controlled. --- src/Drupal/Commands/core/EntityCommands.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Drupal/Commands/core/EntityCommands.php b/src/Drupal/Commands/core/EntityCommands.php index f857e82f01..f00ea8b825 100644 --- a/src/Drupal/Commands/core/EntityCommands.php +++ b/src/Drupal/Commands/core/EntityCommands.php @@ -167,7 +167,7 @@ public function doSave(string $entity_type, array $ids): void protected function getQuery(string $entity_type, ?string $ids, array $options): QueryInterface { $storage = $this->entityTypeManager->getStorage($entity_type); - $query = $storage->getQuery(); + $query = $storage->getQuery()->accessCheck(false); if ($ids = StringUtils::csvToArray((string) $ids)) { $idKey = $this->entityTypeManager->getDefinition($entity_type)->getKey('id'); $query = $query->condition($idKey, $ids, 'IN');