WordPress.org

Make WordPress Core

Changeset 5075


Ignore:
Timestamp:
03/21/07 22:20:48 (8 years ago)
Author:
ryan
Message:

Check for publish caps when editing via xmlrpc. For 2.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/xmlrpc.php

    r5055 r5075  
    436436      extract($actual_post); 
    437437 
     438      if ( ('publish' == $post_status) && !current_user_can('publish_posts') ) 
     439        return new IXR_Error(401, 'Sorry, you do not have the right to publish this post.'); 
     440 
    438441      $post_title = xmlrpc_getposttitle($content); 
    439442      $post_category = xmlrpc_getpostcategory($content); 
     
    631634      $post_more = $content_struct['mt_text_more']; 
    632635      $post_status = $publish ? 'publish' : 'draft'; 
     636 
     637 
     638      if ( ('publish' == $post_status) && !current_user_can('publish_posts') ) 
     639        return new IXR_Error(401, 'Sorry, you do not have the right to publish this post.'); 
    633640 
    634641      if ($post_more) { 
Note: See TracChangeset for help on using the changeset viewer.