thunderbird_accounts.authentication.models
Classes
|
Allow List Entry |
|
- class thunderbird_accounts.authentication.models.User(*args, **kwargs)[source]
Bases:
AbstractUser,BaseModel- Parameters:
username – The thundermail address, aligns with keycloak’s usage of username.
oidc_id – The ID of the connected oidc account
last_used_email – The last used email associated with this account
language – The user’s preferred language to view the ui/system emails in
display_name – Display name from oidc profile
avatar_url – Avatar URL from oidc profile
timezone – The user’s timezone
password (CharField) – Password
last_login (DateTimeField) – Last login
is_superuser (BooleanField) – Superuser status. Designates that this user has all permissions without explicitly assigning them.
first_name (CharField) – First name
last_name (CharField) – Last name
email (EmailField) – Email address
is_staff (BooleanField) – Staff status. Designates whether the user can log into this admin site.
is_active (BooleanField) – Active. Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
date_joined (DateTimeField) – Date joined
uuid (UUIDField) – Primary key: Uuid
created_at (DateTimeField) – Created at
updated_at (DateTimeField) – Updated at
is_test_account (BooleanField) – Test Account. Whether this account is used for testing.
is_awaiting_payment_verification (BooleanField) – Is awaiting payment verification. The user has paid and we’re waiting on Paddle to verify the payment was successful.<br><b>Note:</b> Please do not override this unless authorized.
Relationship fields:
- Parameters:
plan (
ForeignKeytoPlan) – Plan (related name:user)groups (
ManyToManyFieldtoGroup) – Groups. The groups this user belongs to. A user will get all permissions granted to each of their groups. (related name:user_set)user_permissions (
ManyToManyFieldtoPermission) – User permissions. Specific permissions for this user. (related name:user_set)
Reverse relationships:
- Parameters:
allowlistentry (Reverse
ForeignKeyfromAllowListEntry) – All Allow list entries of this user (related name ofuser)subscription (Reverse
ForeignKeyfromSubscription) – All subscriptions of this user (related name ofuser)account (Reverse
ForeignKeyfromAccount) – All accounts of this user (related name ofuser)domains (Reverse
ForeignKeyfromDomain) – All domains of this user (related name ofuser)logentry (Reverse
ForeignKeyfromLogEntry) – All log entries of this user (related name ofuser)
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- class thunderbird_accounts.authentication.models.AllowListEntry(*args, **kwargs)[source]
Bases:
BaseModelAllow List Entry
This is a small model that holds an email address and a user_id. If an email address on a AllowListEntry is in the db then that user can successfully sign-up and move onto the Subscribe screen. Otherwise, they’ll just see the wait list.
If a user is created from an allow list entry their user will generally be populated in the user_id field / user relationship. (Unless they’re created by outside means.)
- Parameters:
uuid (UUIDField) – Primary key: Uuid
created_at (DateTimeField) – Created at
updated_at (DateTimeField) – Updated at
email (EmailField) – Email address
Relationship fields:
- Parameters:
user (
ForeignKeytoUser) – User. The user associated with this allow list entry, if any. (related name:allowlistentry)
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned