[wp-trac] [WordPress Trac] #38962: REST API: Don't delete posts/links when deleting/removing a user from a site in a multisite install

WordPress Trac noreply at wordpress.org
Wed Nov 30 23:25:00 UTC 2016


#38962: REST API: Don't delete posts/links when deleting/removing a user from a
site in a multisite install
------------------------------------------+------------------------
 Reporter:  ocean90                       |       Owner:
     Type:  defect (bug)                  |      Status:  new
 Priority:  high                          |   Milestone:  4.7
Component:  REST API                      |     Version:  trunk
 Severity:  major                         |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:  multisite
------------------------------------------+------------------------

Comment (by jnylen0):

 As discussed in Slack we should use `0` instead of `null`. This is both
 easier and more consistent with the rest of the API (page and comment
 parent use 0 to unset, for example).

 These tests can use the `assertErrorResponse` helper to test the error
 code and the HTTP status at the same time.

 I would also suggest using a more descriptive error code since we can't
 add a new string, like `rest_cannot_delete_multisite_user`.

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


More information about the wp-trac mailing list