[wp-trac] [WordPress Trac] #47443: REST-API prevents users with edit_published_posts capability updating published posts

WordPress Trac noreply at wordpress.org
Thu Jul 2 22:44:58 UTC 2020


#47443: REST-API prevents users with edit_published_posts capability updating
published posts
-------------------------------------------------+-------------------------
 Reporter:  derweili                             |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  5.5
Component:  REST API                             |     Version:  5.2.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-unit-tests needs-    |     Focuses:  rest-api
  refresh                                        |
-------------------------------------------------+-------------------------

Comment (by peterwilsoncc):

 Following up my comment above, the first permission check for editing an
 existing post should be `current_user_can( 'edit_post', $post_id )` -- the
 meta capability checks in the API were recently modified to match those in
 core for `edit_post`, `delete_post` and `read_post`.

 See #50128, [47850]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47443#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list