This module works great. I would like to see permission to allow junking nodes that a user owns. Something along the lines of 'delete own page content' for the node module. It would be really nice if this was implemented as a hook for the normal node deletion, so the user interaction did not change at all (they have no idea that the Junk module exists).
Comments
Comment #1
jthurman commentedI'm working on a patch that does this, however I have expanded it to include allowing users to restore their own nodes too. I am having a little problem getting the permissions to work right, but I'll upload the patch once it is done.
Comment #2
AliraSirin commentedOk, let's see the patch. If it's ok I'll make a new release as there are not many users of this module yet and making new feature releases is not too bad.
Comment #3
AliraSirin commentedAchieving your initial request can be done by adding this lines to junk_can_junk() function:
I'm thinking now of removing 'junk any node' permission and using built-in Drupal content deletion perms ('delete own %type content' and 'delete any %type content') for determining if user can move node to Junk. And for allowing to completly delete nodes from Junk 'delete' + 'clear Junk' perms could be used together. Since there are no 'restore'-like permissons in Drupal core 'restore %type content' and 'restore any content' should be added.
Comment #4
alekas commentedHi, I have the same problem my users can view and delete all the content sent to the junk.
For safety, I wish they could see and delete only their own content.
I tried changing the permissions of users, preventing them from removing any node, but still does not work, I also tried adding the php code from the previous post but neither worked.
I would like to modify the code to achieve this goal, but unfortunately my php skills are few, can you help ?
Comment #5
AliraSirin commentedThere's a new 1.2 release of Junk that implements new permissions system. Now only users with "junk %type% content" perm can junk and restore their own nodes and only users with "clear junk" perm can delete nodes permanently.
Comment #6
AliraSirin commented