From 0c5da2bd46d9292ecad947985ade8d7823fd964e Mon Sep 17 00:00:00 2001 From: nfebe Date: Tue, 22 Sep 2026 15:10:48 +0100 Subject: [PATCH 1/4] feat(access): Configure visitor email verification for domains Operators can protect a domain or path from the domain form, choose who may sign in, and select the email delivery target and session length. --- src/components/DomainFormModal.test.ts | 31 ++++++++ src/components/DomainFormModal.vue | 97 +++++++++++++++++++++++++- src/types/index.ts | 9 +++ 3 files changed, 136 insertions(+), 1 deletion(-) diff --git a/src/components/DomainFormModal.test.ts b/src/components/DomainFormModal.test.ts index e36c1d8..4098b77 100644 --- a/src/components/DomainFormModal.test.ts +++ b/src/components/DomainFormModal.test.ts @@ -76,3 +76,34 @@ describe("DomainFormModal static caching", () => { expect(saved.static_cache).toBe(true); }); }); + +describe("DomainFormModal visitor access", () => { + it("preserves an email allowlist and session settings", async () => { + const wrapper = mountModal({ + id: "d1", + service: "web", + container_port: 80, + domain: "private.example.com", + ssl: { enabled: true, auto_cert: true }, + access: { + enabled: true, + mode: "allowlist", + allowed_emails: ["person@example.com"], + email_target_id: "smtp-primary", + session_hours: 48, + }, + }); + + document.querySelector(".btn-primary")?.click(); + await wrapper.vm.$nextTick(); + + const saved = wrapper.emitted("save")?.[0]?.[0] as DomainConfig; + expect(saved.access).toEqual({ + enabled: true, + mode: "allowlist", + allowed_emails: ["person@example.com"], + email_target_id: "smtp-primary", + session_hours: 48, + }); + }); +}); diff --git a/src/components/DomainFormModal.vue b/src/components/DomainFormModal.vue index 78e4a4a..bea697d 100644 --- a/src/components/DomainFormModal.vue +++ b/src/components/DomainFormModal.vue @@ -84,6 +84,48 @@ +
+

Visitor Access

+ +
+ + Protects this domain and path without changing the application. +
+ + +
+
@@ -143,6 +185,11 @@