diff --git a/core/modules/tracker/src/Tests/TrackerTest.php b/core/modules/tracker/src/Tests/TrackerTest.php index d1d538b..002f871 100644 --- a/core/modules/tracker/src/Tests/TrackerTest.php +++ b/core/modules/tracker/src/Tests/TrackerTest.php @@ -129,6 +129,7 @@ function testTrackerUser() { $this->drupalPostForm('comment/reply/node/' . $other_published_my_comment->id() . '/comment', $comment, t('Save')); $this->drupalGet('user/' . $this->user->id() . '/activity'); + $this->assertCacheContext('user.node_grants:view', "Cache depends on access control"); $this->assertNoText($unpublished->label(), "Unpublished nodes do not show up in the user's tracker listing."); $this->assertNoCacheTag('node:' . $unpublished->id(), "Unpublished node does not set a cache tag for the user's tracker listing."); $this->assertText($my_published->label(), "Published nodes show up in the user's tracker listing."); diff --git a/core/modules/tracker/tracker.pages.inc b/core/modules/tracker/tracker.pages.inc index 1a94194..217ca77 100644 --- a/core/modules/tracker/tracker.pages.inc +++ b/core/modules/tracker/tracker.pages.inc @@ -143,6 +143,7 @@ function tracker_page($account = NULL) { ); $page['#sorted'] = TRUE; $page['#cache']['tags'] = $cache_tags; + $page['#cache']['contexts'][] = 'user.node_grants:view'; return $page; }