Hi,

node_privacy_byrole_change_role_action_form had a little bug in creating the form. The patch adjusts the code to the one used in node_privacy_byrole_rolereference_action_form.

Additionally, after invoking nodeapi(update) in node_privacy_byrole_change_role_action it is neccessary to update the node access grants table. Otherwise the npbr permissions will be set, but the node(s) will still not be accessable.
I guess the same must be done in node_privacy_byrole_rolereference_action but I couldn't look at this at the moment. You will know better :-)

CommentFileSizeAuthor
npbr_change_role_action.patch852 bytesFrank Steiner
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cYu’s picture

Status: Needs review » Fixed

Both actions should now be fixed up and working with http://drupal.org/cvs?commit=171598

Status: Fixed » Closed (fixed)

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

Frank Steiner’s picture

Version: 6.x-1.4 » 6.x-1.5
Status: Closed (fixed) » Active

Part of. We still need to update the grants table, otherwise a node which gets the view flag removed for all roles will still be visible to each role that could view it before. I.e. we still need

--- node_privacy_byrole.module.orig     2009-10-08 15:35:47.000000000 +0200
+++ node_privacy_byrole.module  2009-10-08 15:36:24.000000000 +0200
@@ -497,6 +497,7 @@
     $node->node_privacy_byrole['roles'][$rid] = $context['permissions'];
   }
   module_invoke('node_privacy_byrole', 'nodeapi', $node, 'update');
+  node_access_acquire_grants($node);
 }