Skip to content

Commit

Permalink
confirmation: Add comment explaining RealmCreationKey.
Browse files Browse the repository at this point in the history
  • Loading branch information
rishig authored and timabbott committed Nov 30, 2017
1 parent dc244bd commit 0f5c0ea
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions confirmation/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,13 @@ def __init__(self, url_name: str,
validity_in_days=settings.INVITATION_LINK_VALIDITY_DAYS)
}

# Confirmation pathways for which there is no content_object that we need to
# keep track of.
# Functions related to links generated by the generate_realm_creation_link.py
# management command.
# Note that being validated here will just allow the user to access the create_realm
# form, where they will enter their email and go through the regular
# Confirmation.REALM_CREATION pathway.
# Arguably RealmCreationKey should just be another ConfirmationObjT and we should
# add another Confirmation.type for this; it's this way for historical reasons.

def check_key_is_valid(creation_key: Text) -> bool:
if not RealmCreationKey.objects.filter(creation_key=creation_key).exists():
Expand Down

0 comments on commit 0f5c0ea

Please sign in to comment.