Ticket #38879: 38879.patch
File 38879.patch, 938 bytes (added by , 8 years ago) |
---|
-
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
587 587 $post_type = get_post_type_object( $this->post_type ); 588 588 589 589 if ( $post && ! $this->check_update_permission( $post ) ) { 590 return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you are not allowed to updatethis post.' ), array( 'status' => rest_authorization_required_code() ) );590 return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you are not allowed to edit this post.' ), array( 'status' => rest_authorization_required_code() ) ); 591 591 } 592 592 593 593 if ( ! empty( $request['author'] ) && get_current_user_id() !== $request['author'] && ! current_user_can( $post_type->cap->edit_others_posts ) ) {