Skip to content
Snippets Groups Projects
Commit 59bed020 authored by Jonas Braathen's avatar Jonas Braathen
Browse files

Add an identity type for generic national ID card numbers

parent c304dbdc
No related branches found
No related tags found
No related merge requests found
Pipeline #180923 passed
# Generated by Django 4.1.4 on 2023-02-02 10:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("greg", "0028_person_meta_alter_invitation_role_and_more"),
]
operations = [
migrations.AlterField(
model_name="identity",
name="type",
field=models.CharField(
choices=[
("feide_id", "Feide Id"),
("feide_email", "Feide Email"),
("passport_number", "Passport Number"),
("norwegian_national_id_number", "Norwegian National Id Number"),
(
"norwegian_national_id_card_number",
"Norwegian National Id Card Number",
),
("national_id_card_number", "National Id Card Number"),
("private_email", "Private Email"),
("private_mobile", "Private Mobile Number"),
("migration_id", "Migration Id"),
],
max_length=64,
),
),
]
......@@ -284,16 +284,25 @@ class Identity(BaseModel):
"""
class IdentityType(models.TextChoices):
# Feide ID, i.e. eduPersonPrincipalName
FEIDE_ID = "feide_id"
FEIDE_EMAIL = "feide_email"
# Passport number
# Format: # Format: {ALPHA-2-COUNTRY-CODE}-{DOCUMENT-NUMBER}
PASSPORT_NUMBER = "passport_number"
# Norwegian national ID - "fødselsnummer" or D-number
# Norwegian national ID - "fødselsnummer" or D-number (or SO-number)
# Format: 11 digits, with leading zero if applicable
NORWEGIAN_NATIONAL_ID_NUMBER = "norwegian_national_id_number"
# Norwegian national ID card document number
NORWEGIAN_NATIONAL_ID_CARD_NUMBER = "norwegian_national_id_card_number"
# Catch-all for saving generic national ID card numbers
# Format: {ALPHA-2-COUNTRY-CODE}-{DOCUMENT-NUMBER}
NATIONAL_ID_CARD_NUMBER = "national_id_card_number"
PRIVATE_EMAIL = "private_email"
# Mobile phone number
# Format: E.164
PRIVATE_MOBILE_NUMBER = "private_mobile"
# Used to identify the id of this person in some other system
# Used to identify the ID of this person in some other system
MIGRATION_ID = "migration_id"
class Verified(models.TextChoices):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment