Closed (fixed)
Project:
Comment Delete
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
2 Sep 2009 at 10:58 UTC
Updated:
13 Apr 2010 at 00:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
Sera commentedHi,
I have the same problem. I want authenticated users to be able to delete their own comments (with the ability to only move other comments one level up). Only the admin should have the rights to delete all other comments.
While looking on the code I saw an easy way to do it. I added a permission called "select admin replies action". To whomever this is granted, can see both options. The permission "select replies action" only grants the ability to move comments one level up. [Please see attached the new comment_delete.module as zip file, based on vers. 6.x-1.1 of this module]
I added line #9:
#5 function comment_delete_perm() {
#6 return array(
#7 'delete own comments',
#8 'delete any comment',
#9 'select admin replies action',
#10 'select replies action',
#11 );
Copied lines #74 - #95 and inserted it at the empty line #96 again.
[The section started with:
// Allow permissible users to determine how replies of this comment should be handled when
// it is deleted. Users without permissions to change this will use the default setting.
if (user_access('select ...]
Then I changed the new line #77 to
if (user_access('select admin replies action')) {
and I changed the new line #105 to
// 0 => t('Delete all replies of the comment'),
I am sorry I dont know how to create a patch... but I still hope this helps.
Best regards
Sera
PS: I dont know how to fix the "clock" issue though.
Comment #2
bobooon commentedI have committed the following into HEAD for the next release:
Thanks!
Comment #3
bobooon commented