[wp-trac] [WordPress Trac] #43438: Add filters and Ajax support for personal data export

WordPress Trac noreply at wordpress.org
Mon Jul 30 21:03:59 UTC 2018


#43438: Add filters and Ajax support for personal data export
--------------------------------------+-----------------------
 Reporter:  azaozz                    |       Owner:  desrosj
     Type:  enhancement               |      Status:  assigned
 Priority:  low                       |   Milestone:  4.9.9
Component:  Privacy                   |     Version:  4.9.6
 Severity:  normal                    |  Resolution:
 Keywords:  has-unit-tests has-patch  |     Focuses:
--------------------------------------+-----------------------
Changes (by desrosj):

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


Comment:

 In [attachment:"43438.14.diff"]

 - Change `@since` to `4.9.9`.
 - Fix some docblock indentation and spelling/grammar issues.
 - Moved `$this->_setRole( 'administrator' );` calls to the `setUp()`
 method. This code was in every method except one, and that one set the
 role to `author`.
 - Added test method for when an incorrect request type is passed (export
 request sent for an erase request).
 - Added missing test assertions for erase functionality.
 - Moved the eraser friendly name check higher up in
 `wp_ajax_wp_privacy_erase_personal_data()`.
 - Include the eraser friendly name in more error messages to be more
 informative.
 - Fixes an incorrect error message when attempting to erase personal data
 and the request is not the remove type.

 When the user submitting the request does not have the correct capability,
 the error returned is `Invalid request.`. Thinking that this should be
 changed to something more descriptive, such as `Incorrect permissions.`.

 I believe all potential scenarios in these two functions are now covered.
 @birgire if you could review, that would be great. I am wondering if we
 can cut down on some code repetition.

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


More information about the wp-trac mailing list