-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from edx/ashultz0/verified-name-status
Switch verified name from boolean to status enumeration
- Loading branch information
Showing
11 changed files
with
140 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
edx_name_affirmation/migrations/0003_verifiedname_status.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.2.24 on 2021-08-13 12:46 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('edx_name_affirmation', '0002_verifiednameconfig'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='verifiedname', | ||
name='status', | ||
field=models.CharField(choices=[('pending', 'pending'), ('submitted', 'submitted'), ('approved', 'approved'), ('denied', 'denied')], default='pending', max_length=32), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
edx_name_affirmation/migrations/0004_auto_20210816_0958.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.2.24 on 2021-08-16 09:58 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('edx_name_affirmation', '0003_verifiedname_status'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='verifiedname', | ||
name='is_verified', | ||
field=models.BooleanField(default=False, null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
""" | ||
Statuses for edx_name_affirmation. | ||
""" | ||
|
||
from enum import Enum | ||
|
||
|
||
class VerifiedNameStatus(str, Enum): | ||
""" | ||
Possible states for the verified name. | ||
Pending: the verified name has been created | ||
Submitted: the verified name has been submitted to a verification authority | ||
Approved, Denied: resulting states from that authority | ||
This is the status of the verified name attempt, which is related to | ||
but separate from the status of the verifying process such as IDV or proctoring. | ||
Status changes in the verifying processes are usually more fine grained. | ||
For example when proctoring changes from ready to start to started the verified | ||
name is still pending. Once proctoring is actually submitted the verified name | ||
can be considered submitted. | ||
The expected lifecycle is pending -> submitted -> approved/denied. | ||
.. no_pii: This model has no PII. | ||
""" | ||
PENDING = "pending" | ||
SUBMITTED = "submitted" | ||
APPROVED = "approved" | ||
DENIED = "denied" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.