Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
greg
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
it-bott-integrasjoner
greg
Commits
59bed020
Commit
59bed020
authored
2 years ago
by
Jonas Braathen
Browse files
Options
Downloads
Patches
Plain Diff
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
2 years ago
Stage: venv update
Stage: tests and linting
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
greg/migrations/0029_alter_identity_type_add_national_id_card_number.py
+34
-0
34 additions, 0 deletions
...s/0029_alter_identity_type_add_national_id_card_number.py
greg/models.py
+11
-2
11 additions, 2 deletions
greg/models.py
with
45 additions
and
2 deletions
greg/migrations/0029_alter_identity_type_add_national_id_card_number.py
0 → 100644
+
34
−
0
View file @
59bed020
# 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
,
),
),
]
This diff is collapsed.
Click to expand it.
greg/models.py
+
11
−
2
View file @
59bed020
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment