WordPress.org

Make WordPress Core

Opened 11 months ago

Closed 3 months ago

Last modified 3 months ago

#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: privacy 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)

Screen Shot 2018-07-30 at 10.36.02 AM.png (29.7 KB) - added by garrett-eclipse 11 months ago.
Export Personal Data form
Screen Shot 2018-07-30 at 10.36.12 AM.png (29.5 KB) - added by garrett-eclipse 11 months ago.
Erase Personal Data form
44676.diff (5.1 KB) - added by garrett-eclipse 9 months ago.
Adds support for multiple requests via comma-separated list.
44676.2.diff (5.2 KB) - added by garrett-eclipse 9 months ago.
Added breaks to avoid execution when Invalid Action
44676.3.diff (5.2 KB) - added by garrett-eclipse 9 months ago.
Fixed spelling of comma-delimited
Screen Shot 2018-10-11 at 12.15.42 AM.png (71.1 KB) - added by garrett-eclipse 9 months ago.
Erase Personal Data request form w/ new verbiage
Screen Shot 2018-10-11 at 12.15.48 AM.png (71.9 KB) - added by garrett-eclipse 9 months ago.
Export Personal Data request form w/ updated verbiage

Download all attachments as: .zip

Change History (24)

@garrett-eclipse
11 months ago

Export Personal Data form

@garrett-eclipse
11 months ago

Erase Personal Data form

@garrett-eclipse
9 months ago

Adds support for multiple requests via comma-separated list.

@garrett-eclipse
9 months ago

Added breaks to avoid execution when Invalid Action

@garrett-eclipse
9 months ago

Fixed spelling of comma-delimited

@garrett-eclipse
9 months ago

Erase Personal Data request form w/ new verbiage

@garrett-eclipse
9 months ago

Export Personal Data request form w/ updated verbiage

#1 @garrett-eclipse
9 months 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.


9 months ago

#3 @garrett-eclipse
9 months ago

  • Milestone changed from Awaiting Review to 5.1

#4 @desrosj
6 months ago

  • Milestone changed from 5.1 to 5.2

This still needs testing and UX feedback.

#5 @garrett-eclipse
5 months ago

  • Owner set to garrett-eclipse
  • Status changed from new to assigned

#6 @garrett-eclipse
5 months ago

  • Keywords ui-feedback added

#7 @xkon
4 months 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.


4 months ago

#9 @birgire
4 months 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() that avoids duplicates but uses sanitize_title()

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.
Last edited 4 months ago by birgire (previous) (diff)

This ticket was mentioned in Slack in #core-privacy by garrett-eclipse. View the logs.


4 months ago

This ticket was mentioned in Slack in #design by karmatosed. View the logs.


3 months ago

#12 @melchoyce
3 months 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 @michelleweber
3 months 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 @xkon
3 months 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 @garrett-eclipse
3 months 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.

#16 @SergeyBiryukov
3 months ago

  • Resolution set to maybelater
  • Status changed from assigned to closed

#17 @garrett-eclipse
3 months ago

  • Keywords needs-refresh removed
Note: See TracTickets for help on using tickets.