Closed (won't fix)
Project:
Usernode
Version:
5.x-1.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Aug 2007 at 20:52 UTC
Updated:
3 Feb 2013 at 17:59 UTC
"Node: Edit link" should depend on if a user is allowed to edit THIS node.
I tried to get a view with all nodes created by the current user. From this view (block) I'd like to have a direct "edit" link. This works with the administrator account, but not with an authenticated user account... :(
Comments
Comment #1
merlinofchaos commentedViews uses node_access('update', $node) to test for edit permission in the handler. This should work as you suggest. It does not depend upon administer content.
Comment #2
Grooviak commentedoh... that's interesting. Maybe the problem occurs only with usernodes. I'll test this...
Comment #3
Grooviak commentedWorks fine with another nodetype (Page). Seems to be a "usernode issue". Doesn't it?
Comment #4
Grooviak commentedComment #5
merlinofchaos commentedSounds like it.
Comment #6
Grooviak commentedThank you, merlinofchaos.
Changed to Usernode-Project.
Seems to be a bug in the Usernode module. Or are there any reasons for this behaivor?
Comment #7
fagoI suppose you have permission to edit the usernode when you test this? ;)
Hm, no of course this isn't intended, I'll have a look at it when I find time.
Comment #8
Grooviak commentedThank you, fago.
The Permission for "athenticated user" is set on "edit own usernode". That should be enough, I think..?
Of course "authicated user" hasn't the permission to "edit usernodes" generally.
Comment #9
fagohm? so if you list usernodes, of course the link only appears if your users have permission to edit the usernode.
Comment #10
Grooviak commentedLet me explain you the case:
I've got a view, which views a block with the following parameters:
Filters:
Node: Author is Current User, Is Equal to, Currently Logged In User
Node: Type, Is One Of, Usernode
Fields:
Node: Title
Node: Link to node
Node: Edit link
The user has the permission to edit his own usernode (on which this view references). But the edit link is not viewed. It's only viewed if the user has the permission to edit usernodes in general (which would allow this user to edit other users usernodes).
Am I wrong?
Comment #11
weimeng commentedI can confirm this behavior even in 5.x-1.4.
It is preventing my planned use of usernode to automatically create nodes for the Bio module to use as a profile node, as users are not able to edit their own Usernode.
Comment #12
weimeng commentedI believe I have found a solution for this issue. As I am new to Drupal coding and unsure if my changes have any side effects, it will need a review.
This is the original code for the is_usernode function:
Change the return line (on line 346) to:
Forgive me for not rolling a proper patch file, I don't really know how to do one. :s
Comment #13
pomliane commentedThis version of Usernode is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.
This issue has been automagically closed by a script.