mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 11:27:09 +00:00
feat: add consent form for data processing
This commit is contained in:
18
people/migrations/0030_user_consent_given.py
Normal file
18
people/migrations/0030_user_consent_given.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.2.10 on 2021-01-20 11:25
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('people', '0029_organisation_location_fields'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='user',
|
||||
name='consent_given',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
||||
@@ -32,6 +32,9 @@ class User(AbstractUser):
|
||||
"""
|
||||
email = models.EmailField(_('email address'), blank=False, null=False)
|
||||
|
||||
#: Have they given consent to collect and store their data?
|
||||
consent_given = models.BooleanField(default=False)
|
||||
|
||||
def has_person(self) -> bool:
|
||||
"""
|
||||
Does this user have a linked :class:`Person` record?
|
||||
|
||||
Reference in New Issue
Block a user