From f6a1fd40410d1027bec1c71650a75e118d995ca9 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Wed, 26 Aug 2009 06:47:45 +0000 Subject: [PATCH] Fix comment moderation for authors, props scribu, fixes #10677 git-svn-id: https://develop.svn.wordpress.org/trunk@11881 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/admin-ajax.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index 9a29fa7047..434eee91b1 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -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 );