From f5c84caaf1316e0d15eadebf24686607229dce05 Mon Sep 17 00:00:00 2001 From: Helgi Hrafn Gunnarsson Date: Tue, 12 Jun 2018 13:08:53 +0000 Subject: [PATCH 1/2] Email-wanted field in user profile made nullable, so that we can distinguish between those who have not given consent and those who have expressly rejected email. This is because implied consent used to be allowed, but now all new users should decide during registration whether they want email or not. --- core/migrations/0054_auto_20180612_1305.py | 20 ++++++++++++++++++++ core/models.py | 13 +++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 core/migrations/0054_auto_20180612_1305.py diff --git a/core/migrations/0054_auto_20180612_1305.py b/core/migrations/0054_auto_20180612_1305.py new file mode 100644 index 00000000..7b120b22 --- /dev/null +++ b/core/migrations/0054_auto_20180612_1305.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.13 on 2018-06-12 13:05 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0053_auto_20180605_1214'), + ] + + operations = [ + migrations.AlterField( + model_name='userprofile', + name='email_wanted', + field=models.NullBooleanField(default=False, help_text='Whether to consent to receiving notifications via email.', verbose_name='Consent for sending email'), + ), + ] diff --git a/core/models.py b/core/models.py index 1a439288..94a98301 100644 --- a/core/models.py +++ b/core/models.py @@ -44,8 +44,17 @@ class UserProfile(models.Model): picture = models.ImageField(upload_to='profiles', verbose_name=_("Picture"), null=True, blank=True) joined_org = models.DateTimeField(null=True, blank=True) # Time when user joined organization, as opposed to registered in the system - # User settings - email_wanted = models.BooleanField(default=False, verbose_name=_('Consent for sending email'), help_text=_('Whether to consent to receiving notifications via email.')) + # When this is null (None), it means that the user has not consented to, + # nor specifically rejected receiving email. This is a left-over state + # from when implied consent sufficed, but should gradually be decreased + # until all users have either consented or not. No new members should have + # this field as null (None). + email_wanted = models.NullBooleanField( + default=False, + verbose_name=_('Consent for sending email'), + help_text=_('Whether to consent to receiving notifications via email.') + ) + language = models.CharField(max_length=6, default='en', choices=settings.LANGUAGES, verbose_name=_("Language")) topics_showall = models.BooleanField(default=True, help_text=_("Whether to show all topics in a polity, or only starred.")) From d672f0ab0146fd21e69ba9aa67c6d9e961662dee Mon Sep 17 00:00:00 2001 From: Helgi Hrafn Gunnarsson Date: Tue, 12 Jun 2018 13:10:14 +0000 Subject: [PATCH 2/2] Version: 0.10.7 -> 0.10.8 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 2d993c42..1a46c7f1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.10.7 +0.10.8