Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I'm trying to understand if there is a reason that the setting of $or_modules is hard-coded to TRUE in module_grants_node_revision_access() rather than using the config setting like in module_grants_node_access. We have a module doing access checking, which returns FALSE from hook_user_node_access(), but since the revisioning module says yes the user is given access. If I change node_revision_access to use the config value, it works as expected and our module is able to block access as required.
}
// See if other modules have anything to say about this revision_op, i.e.
// whether they implement hook_user_node_access($revision_op, $node).
$or_modules = TRUE; // variable_get('module_grants_OR_modules', FALSE);
$hook = 'user_node_access';
foreach (module_implements($hook) as $module) {
$result = module_invoke($module, $hook, $revision_op, $node);
Thanks for any clarification!
Comments
Comment #1
RdeBoerI can't think of a reason to disagree with you -- looks like I forgot to uncomment the rest of that line!
Checked in.