WordPress.org

Make WordPress Core

Changeset 5651


Ignore:
Timestamp:
06/04/2007 06:31:32 PM (15 years ago)
Author:
ryan
Message:

Add 'edit_posts' capability check to metaWeblog.newPost. Props Joseph Scott and Wei-Yeh Lee. fixes #4404 for 2.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xmlrpc.php

    r5640 r5651  
    926926      }
    927927
     928      $cap = ($publish) ? 'publish_posts' : 'edit_posts';
    928929      $user = set_current_user(0, $user_login);
    929       if ( !current_user_can('publish_posts') )
     930      if ( !current_user_can($cap) )
    930931        return new IXR_Error(401, __('Sorry, you can not post on this weblog or category.'));
    931932
Note: See TracChangeset for help on using the changeset viewer.