"Add/Revoke access for user" Rules action doesn't add the node to ACL

fearlsgroove - May 25, 2009 - 19:38
Project:Content Access
Version:6.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

When using the rules action add access to user, the routine fetches (creates or loads) the acl and adds the user but doesn't add the node. The result is that the ACL doesn't apply to the node. Although the comments state:

    // A following node_save() updates the grants for us.

I assume this refers node_access getting rebuilt?

Attached patch adds the same acl_node_add_acl call as the admin form uses.

AttachmentSize
content_access-rules-acl-node-fix.patch598 bytes

#1

greg.harvey - June 5, 2009 - 16:36
Title:Rules Add access for user doesn't add node to acl» Rules Add/Revoke access for user doesn't add node to acl
Status:needs review» reviewed & tested by the community

Works for me. =)

#2

kiamlaluno - June 21, 2009 - 05:57
Title:Rules Add/Revoke access for user doesn't add node to acl» "Add/Revoke access for user" Rules action doesn't add the node to ACL

I would expect the Rules action to call acl_node_add_acl() as the code for the settings page already does.

#3

fago - July 31, 2009 - 09:10
Status:reviewed & tested by the community» fixed

You are right, committed, thanks!

#4

System Message - August 14, 2009 - 09:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.