[wp-trac] [WordPress Trac] #43709: Fix or remove the "delete revision" endpoint

WordPress Trac noreply at wordpress.org
Thu Aug 15 20:34:52 UTC 2019


#43709: Fix or remove the "delete revision" endpoint
-------------------------------------------------+-------------------------
 Reporter:  azaozz                               |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.3
Component:  REST API                             |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests early       |     Focuses:  rest-api
  needs-dev-note                                 |
-------------------------------------------------+-------------------------

Comment (by TimothyBlynJacobs):

 I uploaded a patch to fix the test failure. It was using the contributor
 id which does not have permission to edit the post and so is blocked from
 deleting the revision earlier on.

 I also made it return the `rest_cannot_delete` error code instead of the
 generic `rest_forbidden`.

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


More information about the wp-trac mailing list