Skip to content

Heuristic for telling if guest is registered and verified

Deaktivert bruker requested to merge andretol/greg:GREG-20/2 into master

This adds is_registered() -> bool and is_verified() -> bool to the Person model. These are, respectively, convenience methods for telling if they have completed the guest registration (filled in the forms, accepted consent forms, &c.), and for telling if the guest has a valid identity associated with them.

A valid identification method is any one of PersonIdentity.IdentityType with a verified_when attribute set in the past. Future identity checks are considered illegal. If the identity has not been verified (verified_when has not been set), the identification method is considered invalid, and is_verified() will return false. It is possible that we may want to consider some identity types automatically valid at this point, but this has not been encoded into this changset.

If the guest has multiple identities associated with them, is_verified() will return true if at least one of them has been verified. This means a guest can have both verified and unverified identities associated with them, but that only one is required to be verified for the guest to be considered verified.

The combination of is_registered() and is_verified() are meant to signal that the guest is cleared for having an account created in the IGA. GREG should use person.is_registered() and person.is_verified() to gate whether to issue notifications to the IGA.

See the individuals commit messages for implementation details.

Merge request reports

Loading