Skip to content
Snippets Groups Projects

Issue #3504114: If edit own content is added, then the cache context user is...

Closed Issue #3504114: If edit own content is added, then the cache context user is...
1 unresolved thread
Closed catch requested to merge issue/drupal-3504114:3504114-merge into 11.x
1 unresolved thread

Issue #3504114: If edit own content is added, then the cache context user is used, if edit any permissions then only user.permission is added

Closes #3504114

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
219 227 $cacheability->addCacheContexts(['user.roles:authenticated']);
228
220 229 // The "view own unpublished content" permission must not be granted
221 230 // to anonymous users for security reasons.
222 231 if (!$account->isAuthenticated()) {
223 232 return NULL;
224 233 }
225 234
235 // When access is granted due to the 'view own unpublished content'
236 // permission and for no other reason, node grants are bypassed. However,
237 // to ensure the full set of cacheable metadata is available to variation
238 // cache, additionally add the node_grants cache context so that if the
239 // status or the owner of the node changes, cache redirects will continue to
240 // reflect the latest state without needing to be invalidated.
226 241 $cacheability->addCacheContexts(['user']);
242 if ($this->moduleHandler->hasImplementations('node_grants')) {
  • closed

  • Please register or sign in to reply
    Loading