WordPress.org

Make WordPress Core

Changeset 5076


Ignore:
Timestamp:
03/21/2007 10:21:18 PM (11 years ago)
Author:
ryan
Message:

Check for publish caps when editing via xmlrpc. For 2.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/xmlrpc.php

    r4907 r5076  
    434434      extract($actual_post);
    435435
     436      if ( ('publish' == $post_status) && !current_user_can('publish_posts') )
     437        return new IXR_Error(401, 'Sorry, you do not have the right to publish this post.');
     438
    436439      $post_title = xmlrpc_getposttitle($content);
    437440      $post_category = xmlrpc_getpostcategory($content);
     
    613616      $post_more = $content_struct['mt_text_more'];
    614617      $post_status = $publish ? 'publish' : 'draft';
     618
     619
     620      if ( ('publish' == $post_status) && !current_user_can('publish_posts') )
     621        return new IXR_Error(401, 'Sorry, you do not have the right to publish this post.');
    615622
    616623      if ($post_more) {
Note: See TracChangeset for help on using the changeset viewer.