Commit fe6df408 authored by Ivan Doroshenko's avatar Ivan Doroshenko Committed by Sascha Grossenbacher
Browse files

Issue #3231436 by Matroskeen, andregp: Access checking must be explicitly specified on entity query

parent 88be4749
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -245,6 +245,7 @@ class TokenMenuTest extends TokenTestBase {
    $this->assertNotEmpty($link['entity_id']);
    $query = \Drupal::entityQuery('menu_link_content')
      ->condition('link.uri', 'entity:node/' . $node->id())
      ->accessCheck(TRUE)
      ->sort('id', 'ASC')
      ->range(0, 1);
    $result = $query->execute();
+1 −0
Original line number Diff line number Diff line
@@ -568,6 +568,7 @@ function token_tokens($type, array $tokens, array $data, array $options, Bubblea
          $count = \Drupal::entityQueryAggregate('node')
            ->aggregate('nid', 'COUNT')
            ->condition('type', $node_type->id())
            ->accessCheck(TRUE)
            ->execute();
          $replacements[$original] = (int) $count;
          break;