feat(email): each account gets its own email, in its own zone (milestone 495)
Milestone 495 "Email goes to each account, in its own time zone", on the operator's ruling (System 156): notifications go to each user, times in their zone, defaults on, toggled per user or per role. - users.notify_alerts / notify_report (migration 0036): None follows the role's default, notify.<kind>.<role> in settings, all on to start. - mail.pick_recipients: active accounts that want the email and have an address mail can reach (an SSO placeholder like name@oidc is skipped and flagged), each in its own zone with no UTC beside it, then the Also send to addresses in their chosen zone with UTC beside. One copy per address, all over one SMTP connection. - Alerts, the weekly report and the test email (to you, in your zone, plus the typed addresses) send that way. The save-time smtp.tz capture is gone. - Notifications: a role × email table of defaults, who each email reaches and who can't be reached, and Also send to with its own zone, which starts as the first admin's to open the page. - Account page: your address and your two switches. Users: an Emailed column, and an admin sets an account's switches on its page. - The Alerts page counts the accounts it emails. zone_select macro and formatting.zones_by_region shared by Account and Notifications. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "_macros.html" import crumbs, page_header, status_badge %}
|
||||
{% from "settings/_tabs.html" import settings_tabs %}
|
||||
{% from "account/_email_choices.html" import email_choices with context %}
|
||||
{% block title %}{{ user.username }} — Users — Steward{% endblock %}
|
||||
{% block section_tabs %}{{ settings_tabs("users") }}{% endblock %}
|
||||
{% block breadcrumb %}{{ crumbs([("Settings", "/settings/"), ("Users", "/settings/users/"), (user.username, "")]) }}{% endblock %}
|
||||
@@ -41,6 +42,9 @@
|
||||
</section>
|
||||
</form>
|
||||
|
||||
{% if not reachable %}<p class="field-hint tone-warn">{{ user.email }} isn't an address mail can reach, so this account gets no email. Set a real one above.</p>{% endif %}
|
||||
{{ email_choices(user, defaults, "/settings/users/" ~ user.id ~ "/email", with_address=false) }}
|
||||
|
||||
<section class="card form-section" aria-labelledby="u-role">
|
||||
<h2 id="u-role" class="section-title">Role</h2>
|
||||
{% if not local %}
|
||||
|
||||
Reference in New Issue
Block a user