diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php
index 9d92cec..6eaa14e 100644
|
a
|
b
|
class wp_xmlrpc_server extends IXR_Server { |
| 1063 | 1063 | if ( !$user = $this->login($username, $password) ) |
| 1064 | 1064 | return $this->error; |
| 1065 | 1065 | |
| 1066 | | if ( !current_user_can( 'moderate_comments' ) ) |
| | 1066 | if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'moderate_comments' ) ) |
| 1067 | 1067 | return new IXR_Error( 401, __( 'Sorry, you cannot edit comments.' ) ); |
| 1068 | 1068 | |
| 1069 | 1069 | do_action('xmlrpc_call', 'wp.getComments'); |
| … |
… |
class wp_xmlrpc_server extends IXR_Server { |
| 1131 | 1131 | if ( !$user = $this->login($username, $password) ) |
| 1132 | 1132 | return $this->error; |
| 1133 | 1133 | |
| 1134 | | if ( !current_user_can( 'moderate_comments' ) ) |
| | 1134 | if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'moderate_comments' ) ) |
| 1135 | 1135 | return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) ); |
| 1136 | 1136 | |
| 1137 | 1137 | if ( !current_user_can( 'edit_comment', $comment_ID ) ) |
| 1138 | | return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) ); |
| | 1138 | return new IXR_Error( 403, __( 'You are not allowed to delete this comment.' ) ); |
| 1139 | 1139 | |
| 1140 | 1140 | do_action('xmlrpc_call', 'wp.deleteComment'); |
| 1141 | 1141 | |
| … |
… |
class wp_xmlrpc_server extends IXR_Server { |
| 1181 | 1181 | if ( !$user = $this->login($username, $password) ) |
| 1182 | 1182 | return $this->error; |
| 1183 | 1183 | |
| 1184 | | if ( !current_user_can( 'moderate_comments' ) ) |
| | 1184 | if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'moderate_comments' ) ) |
| 1185 | 1185 | return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) ); |
| 1186 | 1186 | |
| 1187 | 1187 | if ( !current_user_can( 'edit_comment', $comment_ID ) ) |
| 1188 | | return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) ); |
| | 1188 | return new IXR_Error( 403, __( 'You are not allowed to moderate or edit this comment.' ) ); |
| 1189 | 1189 | |
| 1190 | 1190 | do_action('xmlrpc_call', 'wp.editComment'); |
| 1191 | 1191 | |