By Rigo-1 on
I would like my anonymous users to be able to edit their own nodes only but I can't find the right way to do it.
Could anyone give me the answer to that issue ? I thought about a password protected edit page access but couldn't find an module for that. Password modules are aiming to protect the node's access...
Thanks :)
Comments
Simply set the permission for
Simply set the permission for anonymous users at 'admin/user/permissions'
... Drupal's great ;)
Note that "my anonymous users
Note that "my anonymous users to be able to edit their own nodes" means any anonymous user could edit any other anonymous users node.
Indeed you are right! The
Indeed you are right!
The only reliable way I can think of is to have users register. Other than this, how could you distinguish 1 user from another?
You could possiby create a node with a password field. When coming to edit the node, the user must enter the password along with the new content. This would mean creating some custom code to check if the password is correct.
I have not come across a password protected module as of yet.
possible solution: generate a
possible solution: generate a link when creating a node. using this link, the user can edit the node without being logged in. would be a great module
password protected node solution
I found the following post
http://drupal.org/node/866686
It works very nice and simple. Maybe some development could make this module more generic.
For a site with both registered and anonymous users the solution should be something like that.
Lets assume that the content type "xyz" is availabe for registered and unregistered users.
Registered users have perimission to create / edit / delete own xyz-type nodes.
Unregisterd - anonymous users are able to create / edit / delete "own" xyz-type nodes.
But how the anonymous users are able to edit "their" xyz-type nodes???
The anonymous user should have also permission to create / edit / delete any xyz-type node.
The form edit for this xyz content type should check the edit password (http://drupal.org/node/866686) for the anonymous users, or the ownership of the node ( node->uid ) for the registered - logged in users .
So we have the following cases .
1) the logged in user is the node author > continue and draw the edit form
2) the anonymous user gave the right node edit password ( guid, custom, timestamp etc) > continue and draw the edit form
3) the logged in user is not the author of the node > do not draw the edit form
4) none of the above > do not draw the edit form and show a message, redirect, display 404 or whatever.
Post your ideas or comments!