user invites: graphql: add email invite functionality
Created by: slimsag
This is a super simple backend that lets us send email invites to people from a registered user. For example:
This is used to power the collaborator invite frontend in #30595. You can set DEBUG_EMAIL_INVITES_MOCK=true
and instead of sending real emails it will just log to the console:
There are no tests, because this is only 100 lines of code, and super easy to test manually + once the Cloud team builds out their Organizations/Teams invitation system this API will most likely be scrapped entirely!
I have gotten Security team's thumbs up. For abuse protection the same email address can only be invited once per 24h, AND the only customizable information in the email is the username of the person inviting you - so the risk of abuse is minimal.
DISABLE_EMAIL_INVITES=true
may be set on the frontend containers (and then restarted) to entirely turn off this feature.
Helps #27101 (closed)
Signed-off-by: Stephen Gutekanst [email protected]