Check for extra caps here too.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
38d526d196
commit
b3bc43ab49
|
@ -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) )
|
||||
|
|
Loading…
Reference in New Issue