WordPress.org

Make WordPress Core

Changeset 16800


Ignore:
Timestamp:
12/08/10 16:18:42 (3 years ago)
Author:
westi
Message:

Correct some more cap checks to use the correct caps.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-xmlrpc-server.php

    r16799 r16800  
    13631363            return $this->error; 
    13641364 
    1365         if ( !current_user_can( 'edit_posts' ) ) 
     1365        if ( !current_user_can( 'edit_pages' ) ) 
    13661366            return new IXR_Error( 403, __( 'You are not allowed access to details about this site.' ) ); 
    13671367 
     
    20512051            return new IXR_Error(404, __('Sorry, no such post.')); 
    20522052 
    2053         if ( !current_user_can('edit_post', $post_ID) ) 
     2053        if ( !current_user_can('delete_post', $post_ID) ) 
    20542054            return new IXR_Error(401, __('Sorry, you do not have the right to delete this post.')); 
    20552055 
     
    32723272        do_action('xmlrpc_call', 'mt.publishPost'); 
    32733273 
    3274         if ( !current_user_can('edit_post', $post_ID) ) 
    3275             return new IXR_Error(401, __('Sorry, you cannot edit this post.')); 
     3274        if ( !current_user_can('publish_post', $post_ID) ) 
     3275            return new IXR_Error(401, __('Sorry, you cannot publish this post.')); 
    32763276 
    32773277        $postdata = wp_get_single_post($post_ID,ARRAY_A); 
Note: See TracChangeset for help on using the changeset viewer.