From 04a9e7a552ba8d383b07864a75f289a95b04af66 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 24 Apr 2012 16:22:12 +0000 Subject: [PATCH] Revert [20568] until a publish_post cap is introduced. see #20474 git-svn-id: http://svn.automattic.com/wordpress/trunk@20576 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-xmlrpc-server.php | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index b7783ff817..be7b4f5b54 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -785,23 +785,13 @@ class wp_xmlrpc_server extends IXR_Server { case 'pending': break; case 'private': - if ( $update ) { - if ( ! current_user_can( $post_type->cap->publish_post, $post_data[ 'ID' ] ) ) - return new IXR_Error( 401, __( 'Sorry, you are not allowed to set this post as private.' ) ); - } else { - if ( ! current_user_can( $post_type->cap->publish_posts ) ) - return new IXR_Error( 401, __( 'Sorry, you are not allowed to create private posts in this post type' )); - } + if ( ! current_user_can( $post_type->cap->publish_posts ) ) + return new IXR_Error( 401, __( 'Sorry, you are not allowed to create private posts in this post type' )); break; case 'publish': case 'future': - if ( $update ) { - if ( ! current_user_can( $post_type->cap->publish_post, $post_data[ 'ID' ] ) ) - return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish this post.' ) ); - } else { - if ( ! current_user_can( $post_type->cap->publish_posts ) ) - return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish posts in this post type' )); - } + if ( ! current_user_can( $post_type->cap->publish_posts ) ) + return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish posts in this post type' )); break; default: $post_data['post_status'] = 'draft';