Commit 30ee0152 authored by Nikolay Volodin's avatar Nikolay Volodin Committed by Damien McKenna
Browse files

Issue #3352508 by DamienMcKenna, klimp: Resolve access check errors for D10 compatibility.

parent 7196aba9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ Metatag 8.x-1.x-dev, 2022-xx-xx
#3350298 by DamienMcKenna: Backport metatag_data_decode() from v2.
#3351181 by godotislate, DamienMcKenna: Missing access checks on entity queries
  in metatag_open_graph update hooks.
#3352508 by DamienMcKenna, klimp: Resolve access check errors for D10
  compatibility.


Metatag 8.x-1.22, 2022-09-29
+3 −1
Original line number Diff line number Diff line
@@ -144,7 +144,9 @@ class MetatagCustomCreateForm extends FormBase {
      }

      // Validate that the route doesn't have metatags created already.
      $ids = $this->entityTypeManager->getStorage('metatag_defaults')->getQuery()->condition('id', $route_name)->execute();
      $ids = $this->entityTypeManager->getStorage('metatag_defaults')->getQuery()
        ->accessCheck(FALSE)
        ->condition('id', $route_name)->execute();
      if ($ids) {
        $form_state->setErrorByName('metatag_url',
          $this->t('There are already metatags created for this route.'));
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ class MetatagDefaultsListBuilder extends ConfigEntityListBuilder {
   */
  protected function getEntityIds() {
    $query = $this->getStorage()->getQuery()
      ->accessCheck(FALSE)
      ->condition('id', 'global', '<>');

    // Only add the pager if a limit is specified.
@@ -59,6 +60,7 @@ class MetatagDefaultsListBuilder extends ConfigEntityListBuilder {
      }
    }
    $parents_query = $this->getStorage()->getQuery()
      ->accessCheck(FALSE)
      ->condition('id', $parents, 'IN');
    return $parents_query->execute();
  }