Add edit_page cap check. Props josephscott. see #5313
git-svn-id: http://svn.automattic.com/wordpress/branches/2.3@6710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
14bb4dd834
commit
0998fab88e
|
@ -1196,6 +1196,10 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||
!empty($content_struct["post_type"])
|
||||
&& ($content_struct["post_type"] == "page")
|
||||
) {
|
||||
if( !current_user_can( 'edit_page', $post_ID ) ) {
|
||||
return(new IXR_Error(401, __("Sorry, you do not have the right to edit this page.")));
|
||||
}
|
||||
|
||||
$post_type = "page";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue