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
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment