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

RdeBoer’s picture

Assigned: Unassigned » RdeBoer
Status: Active » Fixed

I can't think of a reason to disagree with you -- looks like I forgot to uncomment the rest of that line!
Checked in.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.