change_role_action doesn't work
Frank Steiner - January 21, 2009 - 08:42
| Project: | node privacy byrole |
| Version: | 6.x-1.5 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Frank Steiner |
| Status: | active |
Jump to:
Description
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 :-)
| Attachment | Size |
|---|---|
| npbr_change_role_action.patch | 852 bytes |

#1
Both actions should now be fixed up and working with http://drupal.org/cvs?commit=171598
#2
Automatically closed -- issue fixed for 2 weeks with no activity.
#3
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);
}