Every user can choise permission for comment to their node without having comment admin permission, this is a smal patch (and my first patch into core), code is not clean ii think is possible write it withut declare a temporary variable.

CommentFileSizeAuthor
#4 comment.patch1.58 KBlilou
#1 comment.patch1.34 KBswentel
comment.patch1.46 KBmavimo

Comments

swentel’s picture

StatusFileSize
new1.34 KB

I like the idea. Updated the patch doing some code cleanup and adding a bit of comments in the code.

mavimo’s picture

@swentel: sorry but i think your patch have a "bug",

$access = user_access('administer comments');
if($node->uid == $user->uid) {
  $access = user_access('administer comments per node');
}

If user have permission to administer coments but don't have administer comments per node can't see comment admin field, we can use this:

$access = user_access('administer comments');
if($node->uid == $user->uid && !$access) {
  $access = user_access('administer comments per node');
}

to correct this.

swentel’s picture

@mavimo, you're right, didn't think about that, I'll reroll a patch this evening.

lilou’s picture

StatusFileSize
new1.58 KB

Reroll according to #2.

webchick’s picture

Status: Needs review » Closed (duplicate)

This is a duplicate of #146714: Allow users to moderate/administer comments for their own nodes. Could you combine efforts over there?