Check for extra caps here too.

git-svn-id: https://develop.svn.wordpress.org/trunk@16801 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2010-12-08 16:52:08 +00:00
parent b616351b4a
commit 10244cc066
1 changed files with 6 additions and 0 deletions

View File

@ -1099,6 +1099,9 @@ class wp_xmlrpc_server extends IXR_Server {
if ( !current_user_can( 'moderate_comments' ) )
return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) );
if ( !current_user_can( 'edit_comment', $comment_ID ) )
return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) );
do_action('xmlrpc_call', 'wp.deleteComment');
if ( ! get_comment($comment_ID) )
@ -1130,6 +1133,9 @@ class wp_xmlrpc_server extends IXR_Server {
if ( !current_user_can( 'moderate_comments' ) )
return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) );
if ( !current_user_can( 'edit_comment', $comment_ID ) )
return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) );
do_action('xmlrpc_call', 'wp.editComment');
if ( ! get_comment($comment_ID) )