#44676 closed enhancement (maybelater)
Support comma-seperated list for Privacy Requests
Reported by: | garrett-eclipse | Owned by: | garrett-eclipse |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.9.6 |
Component: | Privacy | Keywords: | has-screenshots feature-plugin |
Focuses: | Cc: |
Description
Hello,
It would help admins speed up their privacy request workflow to allow them to supply a comma-seperated list of usernames or email addresses to spawn multiple requests through the Privacy tools (Erase Personal Data & Export Personal Data). Aside from the functionality splitting the submission on comma if present and generating multiple requests from the result this would just need some minor verbiage changes to the instructions, etc.
Thanks
Attachments (7)
Change History (25)
#1
@
6 years ago
- Keywords has-patch needs-testing ux-feedback added
Added initial patch w/ 44676.diff
This introduces the ability to supply a comma-delimited list to the Privacy tools to generate multiple requests.
Introduces $count & $failure_count to track success/failures to be output via notices.
Placed $action_type check prior to the loop and added breaks to avoid execution.
Split the incoming request string by the comma delimiter and ran foreach on results.
Introduced check on wp_create_user_request and wp_send_user_request.
Provided two notices with plurals for success and failure counts.
Updated verbiage on request forms to remove part about ' at this email address ' as it's not true when a user is supplied. Without reads more concisely - 'An email will be sent to the user asking them to verify the request.'
Added verbiage to request forms to indicate comma-delimited lists are now supported - 'To trigger multiple requests supply the usernames or email addresses in a comma-delimited list.'
Please review and test.
This ticket was mentioned in Slack in #core-privacy by garrett-eclipse. View the logs.
6 years ago
#7
@
6 years ago
- Keywords needs-refresh added; has-patch removed
Thanks for this @garrett-eclipse this would be a handy addition in my opinion and a really good start for it also!
Some notes after checking the patch:
1] There are minor CS issues i.e. tabs not spaces for alignments etc.
2] When the emails are added we have to consider the "space" character as well for example:
one@…, two@…, three@… - Wouldn't work as a space would break the mail check.
To address this we could alter $usernames_or_email_addresses = explode( ',', $username_or_email_for_privacy_request );
into $usernames_or_email_addresses = explode( ',', str_replace( ' ', '', $username_or_email_for_privacy_request ) );
to take care of those space characters as well.
3] The foreach
loop you're adding ends with a break;
( line 742 ) most likely forgotten while testing/creating the patch :D .
4] Let's change the wording of "comma-delimited" to "comma-separated" as I think it's most commonly used.
---
As an extra note a user might re-paste the same comma-separated list multiple times with the idea that it would simply add the "extra" e-mails that are not yet in the list. The way the code works now it will exit as soon as it finds an existing mail. To replicate this easily:
Add an export for "one@…" and then try by doing "one@…, two@…, three@…", none will be added. The optimal would be for two@… / three@… to get in that list as well :) .
This ticket was mentioned in Slack in #core-privacy by garrett-eclipse. View the logs.
6 years ago
#9
@
6 years ago
The wp_parse_list()
would become handy here to parse a comma separated string into an array, ignoring white space chars and empty strings:
https://developer.wordpress.org/reference/functions/wp_parse_list/
See also #43977.
There's also wp_parse_slug_list()
but that uses sanitize_title()
that avoids duplicates.
Here's an example, that additionally removes duplicates:
$usernames_or_email_addresses = array_unique( wp_parse_list( $username_or_email_for_privacy_request ) );
Few things that come additionally to mind:
- Should there be a limitation, like 10 or 50? I'm not so sure this new feature should allow sending unlimited number of email requests at once, out of the box.
- Should there be a filterable limit in place?
- Additionally there might be email rate limitations (outside of WordPress) to avoid possible spam emails.
This ticket was mentioned in Slack in #core-privacy by garrett-eclipse. View the logs.
6 years ago
This ticket was mentioned in Slack in #design by karmatosed. View the logs.
6 years ago
#12
@
6 years ago
Can we get a screenshot of the most current patch, both with and without usernames/emails in the field?
Also curious about that icon inside the field — is that from a browser extension?
I also think the copy could use some editing. Will get back to you on that with ideas.
#13
@
6 years ago
Howdy! I think we have an opportunity here to make the copy a bit friendlier and more natural-language -- thinking:
This sends an email asking a person who made the export request to verify that they want their data exported. To send verification requests to more than one person, add multiple usernames or email addresses separated by commas.
#14
@
5 years ago
Sorry for the late reply @melchoyce & @michelleweber !
This tickets scope will be passed into a plugin in general under the wordpressdotorg
community care ( eventually & if possible ) .
As @birgire noted above there are more things that we should consider and cross-check before adding a mass import of requests on these lists due to the outgoing mails etc.
@garrett-eclipse / @birgire
In my opinion we can think of a similar plugin as the importers ( i.e. WordPress Importer ) are as well but targeted for these 2 specific lists ( so it will have it's own settings for mail handling / crons etc as well :) ).
#15
@
5 years ago
- Keywords feature-plugin added; needs-testing ux-feedback ui-feedback removed
- Milestone 5.2 deleted
Thanks everyone for the invaluable feedback, I'm removing the milestone here to re-approach this as a feature plugin in order to account for the concerns around spam and server limitations.
Export Personal Data form