Ticket #5313: xmlrpc.php.diff

File xmlrpc.php.diff, 0.7 kB (added by josephscott, 6 months ago)
  • xmlrpc.php

    old new  
    13791379                        !empty($content_struct["post_type"]) 
    13801380                        && ($content_struct["post_type"] == "page") 
    13811381                ) { 
     1382                        if( !current_user_can( 'edit_page', $post_ID ) ) { 
     1383                                return(new IXR_Error(401, __("Sorry, you do not have the right to edit this page."))); 
     1384                        } 
     1385 
    13821386                        $post_type = "page"; 
    13831387                } 
    13841388 
    1385                 // Edit page caps are checked in editPage.  Just check post here. 
    13861389                if ( ( 'post' == $post_type ) && !current_user_can('edit_post', $post_ID) ) 
    13871390                        return new IXR_Error(401, __('Sorry, you can not edit this post.')); 
    13881391