Make WordPress Core

Changeset 6709


Ignore:
Timestamp:
02/02/2008 05:55:40 PM (17 years ago)
Author:
ryan
Message:

Add edit_page cap check. Props josephscott. see #5313

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xmlrpc.php

    r6691 r6709  
    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.'));
Note: See TracChangeset for help on using the changeset viewer.