Skip to content

Commit

Permalink
Add accessCheck for entity queries for Drupal 10 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
kepol committed Sep 22, 2023
1 parent 3c09b3e commit d62943b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/quant_search/src/Form/QuantSearchPageForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/EventSubscriber/CollectionSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d62943b

Please sign in to comment.