Rebuild permissions does not invalidate cached nodes for anonymous users

Created on 10 April 2016, over 8 years ago
Updated 11 February 2023, over 1 year ago

When a module updates permissions for a node for an anonymous user with hook_node_access_records() the grants are correctly updated in the database table node_access on a node_access_rebuild() call. However the permissions does not take effect until the cache is cleared with a drupal_flush_all_caches().
Same behavior is seen if the permissions are rebuild and caches cleared using the admin interface. For authenticated users permissions takes effect without having to explicitly clear the caches.

I am not sure whether the above is designed behavior, but I would expect that node_access_rebuild() should invalidate the affected nodes in the caches for anonymous users.

🐛 Bug report
Status

Closed: works as designed

Version

9.5

Component
Node system 

Last updated less than a minute ago

No maintainer
Created by

🇪🇸Spain KimNyholm

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇿New Zealand quietone New Zealand

    To investigate this further we need the information asked for 10 months ago in #6. Since that hasn't been provided and this was filed on a now unsupported version of core, it is time to close this.

Production build 0.71.5 2024