From c932c8400a079a842e4dbb5e7045fdf426b5bfcd Mon Sep 17 00:00:00 2001 From: Greg Price Date: Mon, 29 Jan 2018 10:58:00 -0800 Subject: [PATCH] confirmation: Add a field `presume_email_valid` to RealmCreationKey. --- ...06_realmcreationkey_presume_email_valid.py | 20 +++++++++++++++++++ confirmation/models.py | 4 ++++ 2 files changed, 24 insertions(+) create mode 100644 confirmation/migrations/0006_realmcreationkey_presume_email_valid.py diff --git a/confirmation/migrations/0006_realmcreationkey_presume_email_valid.py b/confirmation/migrations/0006_realmcreationkey_presume_email_valid.py new file mode 100644 index 0000000000..0205f2d37a --- /dev/null +++ b/confirmation/migrations/0006_realmcreationkey_presume_email_valid.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2018-01-29 18:39 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('confirmation', '0005_confirmation_realm'), + ] + + operations = [ + migrations.AddField( + model_name='realmcreationkey', + name='presume_email_valid', + field=models.BooleanField(default=False), + ), + ] diff --git a/confirmation/models.py b/confirmation/models.py index c9135c223c..8e52855ad7 100644 --- a/confirmation/models.py +++ b/confirmation/models.py @@ -151,3 +151,7 @@ def generate_realm_creation_url() -> Text: class RealmCreationKey(models.Model): creation_key = models.CharField('activation key', max_length=40) date_created = models.DateTimeField('created', default=timezone_now) + + # True just if we should presume the email address the user enters + # is theirs, and skip sending mail to it to confirm that. + presume_email_valid = models.BooleanField(default=False) # type: bool