Skip to content
Snippets Groups Projects
Commit 3bd0cfeb authored by Igor Čurk's avatar Igor Čurk Committed by Adriano
Browse files

Issue #3341627 by icurk, aronne: Entity queries must explicitly set whether...

Issue #3341627 by icurk, aronne: Entity queries must explicitly set whether the query should be access checked or not
parent b5d644d9
No related branches found
No related tags found
No related merge requests found
......@@ -64,12 +64,13 @@ class PrevNextService implements PrevNextServiceInterface {
$query = $this->entityTypeManager->getStorage('node')->getQuery();
$bundle = $node->bundle();
$langcode = $node->language()->getId();
$nodes = $query->accessCheck(FALSE)->condition('status', NodeInterface::PUBLISHED)
$nodes = $query->condition('status', NodeInterface::PUBLISHED)
->condition('type', $bundle)
->condition('langcode', $langcode)
->addMetaData('type', $bundle)
->addMetaData('langcode', $langcode)
->addTag('prev_next_nodes_type')
->accessCheck(TRUE)
->execute();
return array_values($nodes);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment