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

WordPress Trac noreply at wordpress.org
Thu Feb 6 02:29:01 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.4
Component:  REST API                             |     Version:  5.2.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-unit-tests needs-    |     Focuses:  rest-api
  refresh                                        |
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):

 * keywords:  has-patch needs-unit-tests => has-patch needs-unit-tests
     needs-refresh


Comment:

 @kadamwhite asked me to take a quick look at this with regard to the
 permissions and unit test changes.

 @apieschel
 In terms of modifying existing tests, it's best to only modify them if the
 existing assertions are wrong. Otherwise they should remain unchanged.

 The assertion in `test_create_post_publish_without_permission()` looks
 correct to me, in that the user is having the `publish_posts` permission
 removed, which prevents them from creating a published post.

 This suggests the permissions change needs some work to ensure it works as
 expected. Accordingly I've labeled this as needing a refresh.

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


More information about the wp-trac mailing list