no_new Strategy

Classes:

AuthentificationViewset()

An authentication viewset.

class django_helmholtz_aai.views.auth.no_new.AuthentificationViewset

Bases: AuthentificationViewsetBase

An authentication viewset.

The following strategy is applied for new users:

  • when the email exists already:
    • prevent login

  • when the email does not exist:
    • prevent login

Classes:

AuthentificationView(**kwargs)

An authentication view.

class AuthentificationView(**kwargs)

Bases: NoUserExistsMixin, AuthentificationView

An authentication view.

Classes:

PermissionDeniedReasons(value)

An enumeration.

Methods:

has_permission()

Check if the user has permission to login.

class PermissionDeniedReasons(value)

Bases: TextChoices

An enumeration.

Attributes:

email_not_verified

no_helmholtz_user_exists

vo_not_allowed

email_not_verified = 'email_not_verified'
no_helmholtz_user_exists = 'no_helmholtz_user_exists'
vo_not_allowed = 'vo_not_allowed'
has_permission() bool

Check if the user has permission to login.

This method checks, if the user belongs to the specified HELMHOLTZ_ALLOWED_VOS and verifies that the email does not exist (if this is desired, see HELMHOLTZ_EMAIL_DUPLICATES_ALLOWED setting).