Add better email verification

This commit is contained in:
2026-05-14 23:49:54 +03:00
parent 569d57e144
commit 46fc07a1ae
9 changed files with 394 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ from django.utils.html import format_html
from django.views import View
from django.views.generic import ListView
from apps.submissions.models import Submission
from apps.submissions.models import Submission, VerifiedEmail
class IndexView(ListView):
@@ -119,6 +119,12 @@ class ConfirmEmailView(View):
sub.confirmation_token = ""
sub.save()
# Refresh / record the trust-list entry for this email so subsequent
# guest submissions from the same address (or any +tag variant of
# it) skip the `identifying` step for the next 30 days (plan.md §6).
if sub.guest_email:
VerifiedEmail.record_verification(sub.guest_email)
messages.success(
request,
format_html(