Configure the invitation mailbox in the UI, not the environment
Putting IMAP settings in environment variables was my call to make and it was the wrong one: it meant editing a file on the server and restarting to change a folder name, and it was never offered as a choice. The mailbox is now a row in mailbox_accounts, edited under Settings → Admin: host, user, password, port, folder, interval, on/off. Administrators only — it is a shared forwarding target, not a per-user account. The password is never returned by any endpoint, the same as the CalDAV account routes, and leaving the field empty on edit keeps the stored one so changing a port does not mean retyping it. The panel shows when the mailbox was last read and what went wrong if it did, because a mailbox that quietly stopped working looks exactly like one that has no mail. Worth stating plainly: the password now lives in the database, in clear text, like the CalDAV, Google and Home Assistant credentials beside it. Unlike those three, an IMAP password opens an entire mailbox. The scheduler job is registered unconditionally now — whether a mailbox exists can change without a restart, and fetch_invites returns immediately when none does. test_scheduler knows about it. Also adds the requests list to the sidebar with accept and decline, 26 translation keys across all ten languages, and tests covering that the password is never returned, that an edit without one keeps it, and that a disabled mailbox counts as unconfigured. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
9bf7d3797d
commit
a67602dbc2
@@ -235,6 +235,14 @@
|
||||
</div>
|
||||
<div id="group-list-items"></div>
|
||||
</div>
|
||||
|
||||
<!-- Invitations awaiting a decision -->
|
||||
<div class="cal-list hidden" id="invite-list">
|
||||
<div class="cal-list-header">
|
||||
<span data-i18n="invites_title">Anfragen</span>
|
||||
</div>
|
||||
<div id="invite-list-items"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="sidebar-copyright" id="sidebar-copyright" onclick="openImpressum()">© 2026 Scarriffleservices</button>
|
||||
</aside>
|
||||
@@ -904,6 +912,46 @@
|
||||
<button class="btn btn-primary" id="new-user-save">Erstellen</button>
|
||||
</div>
|
||||
|
||||
<!-- Postfach für Einladungen -->
|
||||
<h4 class="panel-title" style="margin-top:28px"><span data-i18n="invites_mailbox">Einladungs-Postfach</span></h4>
|
||||
<p class="panel-desc" data-i18n="invites_mailbox_desc">Ein Postfach, in dem Termin-Einladungen ankommen. Sie erscheinen als Anfrage und werden erst zu Terminen, wenn du sie annimmst. Zugeordnet wird über die Teilnehmer-Adresse der Einladung — trag die Adresse, unter der du eingeladen wirst, in deinem Profil ein.</p>
|
||||
<div id="mailbox-status" class="panel-desc"></div>
|
||||
<div class="form-group">
|
||||
<label data-i18n="invites_imap_host">IMAP-Server</label>
|
||||
<input type="text" id="mb-imap-host" spellcheck="false" autocapitalize="none" placeholder="imap.example.com" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label data-i18n="invites_imap_user">Benutzername</label>
|
||||
<input type="text" id="mb-imap-user" spellcheck="false" autocapitalize="none" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label data-i18n="invites_imap_password">Passwort</label>
|
||||
<input type="password" id="mb-imap-password" autocomplete="new-password" data-i18n-placeholder="invites_password_keep" placeholder="Unverändert lassen" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label data-i18n="invites_imap_port">Port</label>
|
||||
<input type="number" id="mb-imap-port" value="993" min="1" max="65535" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label data-i18n="invites_imap_folder">Ordner</label>
|
||||
<input type="text" id="mb-imap-folder" value="INBOX" spellcheck="false" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label data-i18n="invites_poll_minutes">Abrufintervall (Minuten)</label>
|
||||
<input type="number" id="mb-poll-minutes" value="5" min="1" max="1440" />
|
||||
</div>
|
||||
<label class="toggle-label" style="margin-bottom:8px">
|
||||
<input type="checkbox" id="mb-imap-ssl" checked /> <span data-i18n="invites_imap_ssl">SSL/TLS</span>
|
||||
</label>
|
||||
<label class="toggle-label" style="margin-bottom:8px">
|
||||
<input type="checkbox" id="mb-enabled" checked /> <span data-i18n="invites_enabled">Aktiv</span>
|
||||
</label>
|
||||
<div class="admin-theme-actions">
|
||||
<button class="btn btn-primary btn-sm" id="mb-save" data-i18n="save">Speichern</button>
|
||||
<button class="btn btn-secondary btn-sm" id="mb-poll" data-i18n="invites_poll_now">Jetzt abrufen</button>
|
||||
<button class="btn btn-ghost btn-sm" id="mb-delete" data-i18n="invites_mailbox_remove">Postfach entfernen</button>
|
||||
</div>
|
||||
|
||||
<!-- Instanz-Standardtheme -->
|
||||
<h4 class="panel-title" style="margin-top:28px" data-i18n="admin_default_theme">Standard-Theme</h4>
|
||||
<p class="panel-desc" data-i18n="admin_default_theme_desc">Gilt für alle Nutzer, die keine eigene Farbe gesetzt haben. „Zurück" bei einer Farbe springt auf diesen Standard.</p>
|
||||
|
||||
Reference in New Issue
Block a user