Fix comment moderation for authors, props scribu, fixes #10677

git-svn-id: https://develop.svn.wordpress.org/trunk@11881 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2009-08-26 06:47:45 +00:00
parent 69cac32a8f
commit f6a1fd4041
1 changed files with 1 additions and 3 deletions

View File

@ -348,9 +348,7 @@ case 'dim-comment' : // On success, die with time() instead of 1
$x->send();
}
if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) )
die('-1');
if ( !current_user_can( 'moderate_comments' ) )
if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) && !current_user_can( 'moderate_comments' ) )
die('-1');
$current = wp_get_comment_status( $comment->comment_ID );