Page MenuHomePhabricator

Send access codes automatically
Closed, ResolvedPublic

Description

T202615 lays the foundation for supporting access code assignments in the platform - coordinators can set partners to distribute via access codes, upload those codes, and assign them to users.

But users then receive an email saying that their info has been sent over to the partner (not true), and coordinators have to email those codes to the users individually.

We should support, instead of 'send to partner' emails, automatically sending the code the user was assigned via email. This might require custom explanation text per-partner, but should otherwise be quite straightforward. When developing this we should bear in mind that in the future we'll be sending similar 'get access now by following these instructions' emails for proxy (T175568). We might want to build this feature in a way that supports that feature too.

Event Timeline

@Nikkimaria Do you think we need per-partner email templates for this? I imagine any generic emails would require followup to explain how to use the code?

https://github.com/WikipediaLibrary/TWLight/pull/246

I've gone with per-partner email explanations in the partner model.

The email body has a generic line, then the access code/login, then space for instructions as set up in the partner object (access_code_instructions).