Closed (outdated)
Project:
Node access user reference
Version:
6.x-3.4
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Jan 2013 at 05:54 UTC
Updated:
23 Feb 2018 at 08:04 UTC
Jump to comment: Most recent
Comments
Comment #1
charlie-s commentedLine 176 of nodeaccess_userreference.module:
This is rather presumptuous, specifically
Who said the author should have all access grants? This gives anonymous users the ability to do whatever they want to nodes without an author. The proper thing to do here would be to check if nodeaccess.module has a setting to allow the author to view / edit / delete the node in question and then set this value, or do nothing at all since nodeaccess handles this already. Or am I missing something?
Comment #2
brenes commentedYes, I can confirm this behaviour. I have this problem on a live site. When there is no author present, anonymous is able to edit the content. Any ideas how to solve this issue?
Best regards
Comment #3
charlie-s commented@brenes I have changed
to
which leaves the default setting so that the author doesn't get grant access, which nodeaccess module already provides via a role (for me). The other thing I would recommend is to uncheck every checkbox on the nodeaccess settings page for "Author may...[view] [edit] [delete]" if you can afford it. Personally, I allow certain roles to administer certain types of content; I have no need for a single node to only be administered by a single user account, but I'm sure others have this need, for example in a community run blog or something. In that instance I think you could allow the author to edit/delete a node and then use some custom code to stop an anonymous user from ever being able to edit any node:
Comment #4
brenes commented@csdco
Great thank you for your workaround. I changed the
line as you stated to
And deactivated every checkbox for Author. Now users without permission are not able to edit a node, where the author is accidentally left blank.
Best Regards
Comment #5
danielb commentedDrupal 6 is no longer supported.
Comment #6
_dcre_ commentedIt looks like this is also the case for Drupal 7