Skip to content
Snippets Groups Projects
Commit 90f67d09 authored by catch's avatar catch
Browse files

Issue #3207477 by jonathanshaw: EntityQuery accessCheck: taxonomy storage...

Issue #3207477 by jonathanshaw: EntityQuery accessCheck: taxonomy storage helper queries should specifiy access checking
parent 4814a98d
Branches
Tags
5 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!16Draft: Resolve #2081585 "History storage"
......@@ -149,6 +149,7 @@ protected function getParents(TermInterface $term) {
if ($ids) {
$query = \Drupal::entityQuery('taxonomy_term')
->accessCheck(TRUE)
->condition('tid', $ids, 'IN');
$loaded_parents = static::loadMultiple($query->execute());
......@@ -210,6 +211,7 @@ public function loadChildren($tid, $vid = NULL) {
*/
public function getChildren(TermInterface $term) {
$query = \Drupal::entityQuery('taxonomy_term')
->accessCheck(TRUE)
->condition('parent', $term->id());
return static::loadMultiple($query->execute());
}
......
......@@ -22,6 +22,7 @@ public function resetCache(array $ids = NULL) {
*/
public function getToplevelTids($vids) {
$tids = \Drupal::entityQuery('taxonomy_term')
->accessCheck(TRUE)
->condition('vid', $vids, 'IN')
->condition('parent.target_id', 0)
->execute();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment