Skip to content

Permissions by term 3179968/3179968 untagged content inaccessible to anonymous users

This patch fixes a problem in 2.25 and 2.26 whereby untagged content becomes inaccessible to anonymous users. The underlying issue is the fact that when node_access records for a node are created, the pbt hook always returns a pbt grant, even if PBT checks shouldn't be applied to the node because "Permission mode" is disabled in the configuration and no terms are selected on the node.

The patch also includes a drush command to allow the user to rebuild permissions affected by the bug and patches to prevent an unnecessary full node access table rebuild. The site I am using PBT on is a government site that has most of a million nodes and takes 5 hours to rebuild node access tables. Rebuilding the node access table is not an option. The code that rebuilds only the affected nodes was reused for the drush command - otherwise I'd not conflate the two patches.

Merge request reports