Add better email verification
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user