diff --git a/core/lib/Drupal/Core/Menu/DefaultMenuLinkTreeManipulators.php b/core/lib/Drupal/Core/Menu/DefaultMenuLinkTreeManipulators.php index 7eefd127..b7fdcfa7 100644 --- a/core/lib/Drupal/Core/Menu/DefaultMenuLinkTreeManipulators.php +++ b/core/lib/Drupal/Core/Menu/DefaultMenuLinkTreeManipulators.php @@ -148,7 +148,6 @@ public function checkNodeAccess(array $tree) { } else { $access_result->addCacheContexts(['user.node_grants:view']); - $query->condition('status', NodeInterface::PUBLISHED); } $nids = $query->execute(); diff --git a/core/tests/Drupal/Tests/Core/Menu/DefaultMenuLinkTreeManipulatorsTest.php b/core/tests/Drupal/Tests/Core/Menu/DefaultMenuLinkTreeManipulatorsTest.php index beb78287..1bc26dba 100644 --- a/core/tests/Drupal/Tests/Core/Menu/DefaultMenuLinkTreeManipulatorsTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/DefaultMenuLinkTreeManipulatorsTest.php @@ -294,9 +294,6 @@ public function testCheckNodeAccess() { $query->expects($this->at(0)) ->method('condition') ->with('nid', [1, 2, 3, 4]); - $query->expects($this->at(1)) - ->method('condition') - ->with('status', NodeInterface::PUBLISHED); $query->expects($this->once()) ->method('execute') ->willReturn([1, 2, 4]);