|
13 | 13 |
|
14 | 14 | from django.conf import settings |
15 | 15 | from django.contrib.auth.models import User |
16 | | -from django.core.exceptions import ObjectDoesNotExist, ValidationError |
| 16 | +from django.core.exceptions import ValidationError |
17 | 17 | from django.core.validators import validate_email |
18 | 18 | from django.db import models |
19 | 19 | from django.template.loader import render_to_string |
@@ -58,7 +58,6 @@ class Person(models.Model): |
58 | 58 | photo = models.ImageField(storage=NoLocationMigrationFileSystemStorage(), upload_to=settings.PHOTOS_DIRNAME, blank=True, default=None) |
59 | 59 | photo_thumb = models.ImageField(storage=NoLocationMigrationFileSystemStorage(), upload_to=settings.PHOTOS_DIRNAME, blank=True, default=None) |
60 | 60 | name_from_draft = models.CharField("Full Name (from submission)", null=True, max_length=255, editable=False, help_text="Name as found in a draft submission.") |
61 | | - consent = models.BooleanField("I hereby give my consent to the use of the personal details I have provided (photo, bio, name, pronouns, email) within the IETF Datatracker", null=True, default=None) |
62 | 61 |
|
63 | 62 | def __str__(self): |
64 | 63 | return self.plain_name() |
@@ -194,32 +193,6 @@ def expired_drafts(self): |
194 | 193 | from ietf.doc.models import Document |
195 | 194 | return Document.objects.filter(documentauthor__person=self, type='draft', states__slug__in=['repl', 'expired', 'auth-rm', 'ietf-rm']).distinct().order_by('-time') |
196 | 195 |
|
197 | | - def needs_consent(self): |
198 | | - """ |
199 | | - Returns an empty list or a list of fields which holds information that |
200 | | - requires consent to be given. |
201 | | - """ |
202 | | - needs_consent = [] |
203 | | - if self.name != self.name_from_draft: |
204 | | - needs_consent.append("full name") |
205 | | - if self.ascii != self.name_from_draft: |
206 | | - needs_consent.append("ascii name") |
207 | | - if self.biography and not (self.role_set.exists() or self.rolehistory_set.exists()): |
208 | | - needs_consent.append("biography") |
209 | | - if self.user_id: |
210 | | - needs_consent.append("login") |
211 | | - try: |
212 | | - if self.user.communitylist_set.exists(): |
213 | | - needs_consent.append("draft notification subscription(s)") |
214 | | - except ObjectDoesNotExist: |
215 | | - pass |
216 | | - for email in self.email_set.all(): |
217 | | - if not email.origin.split(':')[0] in ['author', 'role', 'reviewer', 'liaison', 'shepherd', ]: |
218 | | - needs_consent.append("email address(es)") |
219 | | - break |
220 | | - if self.pronouns_freetext or self.pronouns_selectable: |
221 | | - needs_consent.append("pronouns") |
222 | | - return needs_consent |
223 | 196 |
|
224 | 197 | def save(self, *args, **kwargs): |
225 | 198 | created = not self.pk |
@@ -428,7 +401,6 @@ def __str__(self): |
428 | 401 |
|
429 | 402 | PERSON_EVENT_CHOICES = [ |
430 | 403 | ("apikey_login", "API key login"), |
431 | | - ("gdpr_notice_email", "GDPR consent request email sent"), |
432 | 404 | ("email_address_deactivated", "Email address deactivated"), |
433 | 405 | ] |
434 | 406 |
|
|
0 commit comments