adjutant/adjutant/tasks
Callum Dickinson c99499d9df Add new configuration options for task emails
This change extends the functionality for sending emails
in task stages.

Add the following configuration options for configuring
what email address to send task emails to:

* `to` (`str`) - Send the email to the given arbitrary email address
* `email_current_user` (`bool`) - Email the user who initiated the task

New variables have also been added to the task email template context,
to allow referencing other candidate email addresses in the template
(e.g. "A confirmation email has been sent to `<new email address>`
to confirm your email change"):

* `from_address` (`str`) - The email address the email is being sent
  from internally. Not always the same as the `From` header,
  which is set to `reply_address`.
* `reply_address` (`str`) - The reply-to email address added to the
  email header.
* `email_address` (`str`) - The target email address for this
  email template.
* `email_current_user_address` (`str | None`) - The email address of
  the user that created the task, if available.
* `emails_action_addresses` (`dict[str, str]`) - The recipient
  email addresses configured on the task actions, if a recipient
  email address is set. The key is the action name, the value is
  the target email address.

Multiple emails can now be sent per stage in a task by defining
the `emails` (`list[dict[str, Any]]`) option, and setting
configuration overrides for each individual email.

Change-Id: Ifc83c42bdefcc24e343b8489a917080e6c9785dc
2024-07-24 10:58:19 +12:00
..
migrations Support tox4, update style to match Black 23.1a1 2023-01-04 17:06:31 +13:00
templates Refactor the plugin layer to use entrypoints 2020-02-05 19:07:54 +13:00
v1 Add new configuration options for task emails 2024-07-24 10:58:19 +12:00
__init__.py Rework Adjutant's config system to use CONFspirator 2020-02-05 19:07:04 +13:00
models.py Allow authenticated token requirement for tasks 2020-09-17 13:01:12 +12:00