[development] User not allowed to access node using node_access

Steve Edwards killshot91 at comcast.net
Tue Apr 8 21:18:17 UTC 2008

I wrote a module called Project Permissions that allows access to be 
controlled to Project and Issue nodes by user (using uid as gid in 
node_access).  I installed it on a site, and specified access to a 
certain project node for a certain user, and the record was written as 
was expected to node_access.  The role the user belongs to does not have 
the 'access project' or 'access project issues' permissions enabled.  
The problem is, the user can't even access the project that she should 
have permissions to access according to the record in node_access.  The 
nid for the node is 9, and the user_id is 9, so the data in node_access is:

nid - 9
gid - 9
realm - project_permissions
grant_view - 1
grant_update - 1
grant_delete - 0

Here's my hook_node_grants:

function project_permissions_node_grants($user, $op) {
    $grants['project_permissions'] = array($user->uid);
    return $grants;

I have the devel_node_access block enabled, and I can see that this 
record is the only one being returned from node_access.  I've had this 
working on another site, so I'm not sure what else I could be missing.  
Can anyone explain why my user wouldn't be able to access the node?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20080408/bc20d713/attachment.htm 

More information about the development mailing list