Hi, in function relativity_access_listnodes($op, $node, $user_access) $node is not object so variable shouldn't be use in node_access('update', $node) because it cause 'Access denied'. Fast improvement: $node=node_load($node);

Comments

jonhattan’s picture

Title: Access denied » Access denied to «list of nodes to attach» for users without 'administer nodes' permission
Status: Active » Needs review

Extending the title to describe the use case when this happens. Attached patch implements the solution suggested by jancor.

jonhattan’s picture

StatusFileSize
new710 bytes

attachment..

jonhattan’s picture

StatusFileSize
new4.28 KB

and here is a more elaborated patch that simplifies the code a bit.

Herman Hiddema’s picture

I ran into the same problem, and found the same cause. The first patch is the solution I used as well, but it is quick and dirty. The second patch, which uses %node, is the more correct drupal way to do it, IMO, and should be preferred.

jonhattan’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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