confirmation: Add comment explaining RealmCreationKey.

This commit is contained in:
Rishi Gupta 2017-11-29 15:48:34 -08:00 committed by Tim Abbott
parent dc244bd27e
commit 0f5c0ea92b
1 changed files with 7 additions and 2 deletions

View File

@ -119,8 +119,13 @@ _properties = {
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():