Download & Extend

Access denied to «list of nodes to attach» for users without 'administer nodes' permission

Project:Node Relativity
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

#1

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.

#2

attachment..

AttachmentSize
relativity-541618.patch 710 bytes

#3

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

AttachmentSize
relativity-541618.patch 4.28 KB

#4

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.

#5

Status:needs review» fixed

Commited. http://drupal.org/cvs?commit=417806

#6

Status:fixed» closed (fixed)

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

nobody click here