Commit dd346a30 authored by catch's avatar catch
Browse files

Issue #3203809 by jonathanshaw: EntityQuery accessCheck:...

Issue #3203809 by jonathanshaw: EntityQuery accessCheck: ContentModerationState::loadFromModeratedEntity should not be access sensitive
parent cc0730d1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -135,6 +135,7 @@ public static function loadFromModeratedEntity(EntityInterface $entity) {
      $storage = \Drupal::entityTypeManager()->getStorage('content_moderation_state');

      $ids = $storage->getQuery()
        ->accessCheck(FALSE)
        ->condition('content_entity_type_id', $entity->getEntityTypeId())
        ->condition('content_entity_id', $entity->id())
        ->condition('workflow', $moderation_info->getWorkflowForEntity($entity)->id())
+1 −0
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ protected function loadContentModerationStateRevision(ContentEntityInterface $en
    $content_moderation_storage = \Drupal::entityTypeManager()->getStorage('content_moderation_state');

    $revisions = $content_moderation_storage->getQuery()
      ->accessCheck(FALSE)
      ->condition('content_entity_type_id', $entity->getEntityTypeId())
      ->condition('content_entity_id', $entity->id())
      // Ensure the correct revision is loaded in scenarios where a revision is