Changeset 6709

Show
Ignore:
Timestamp:
02/02/08 17:55:40 (5 months ago)
Author:
ryan
Message:

Add edit_page cap check. Props josephscott. see #5313

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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.'));