diff --git a/modules/quant_search/src/Form/QuantSearchPageForm.php b/modules/quant_search/src/Form/QuantSearchPageForm.php index 0e458dd3..f4dc1ce7 100644 --- a/modules/quant_search/src/Form/QuantSearchPageForm.php +++ b/modules/quant_search/src/Form/QuantSearchPageForm.php @@ -536,6 +536,7 @@ public function save(array $form, FormStateInterface $form_state) { public function exist($id) { $entity = $this->entityTypeManager->getStorage('quant_search_page')->getQuery() ->condition('id', $id) + ->accessCheck(TRUE) ->execute(); return (bool) $entity; } diff --git a/src/EventSubscriber/CollectionSubscriber.php b/src/EventSubscriber/CollectionSubscriber.php index b84a273b..fcb268c5 100644 --- a/src/EventSubscriber/CollectionSubscriber.php +++ b/src/EventSubscriber/CollectionSubscriber.php @@ -118,7 +118,7 @@ public function collectEntities(CollectEntitiesEvent $event) { */ public function collectRedirects(CollectRedirectsEvent $event) { $query = $this->entityTypeManager->getStorage('redirect')->getQuery(); - $ids = $query->execute(); + $ids = $query->accessCheck(TRUE)->execute(); foreach ($ids as $id) { $redirect = Redirect::load($id);