thunderbird_accounts.authentication.admin.models

Classes

AllowListEntryAdmin(model, admin_site)

CustomUserAdmin(model, admin_site)

LogEntryAdmin(model, admin_site)

Allows Admin Log entries to be shown in the django admin panel

class thunderbird_accounts.authentication.admin.models.CustomUserAdmin(model, admin_site)[source]

Bases: UserAdmin

form[source]

alias of CustomUserChangeForm

add_form[source]

alias of CustomNewUserForm

delete_queryset(request, queryset)[source]

Given a queryset, delete it from the database.

delete_model(request, obj: User)[source]

Given a model instance delete it from the database.

class thunderbird_accounts.authentication.admin.models.AllowListEntryAdmin(model, admin_site)[source]

Bases: ModelAdmin

class thunderbird_accounts.authentication.admin.models.LogEntryAdmin(model, admin_site)[source]

Bases: ModelAdmin

Allows Admin Log entries to be shown in the django admin panel

has_add_permission(request)[source]

Return True if the given request has permission to add an object. Can be overridden by the user in subclasses.

has_change_permission(request, obj=None)[source]

Return True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.

Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to change the obj model instance. If obj is None, this should return True if the given request has permission to change any object of the given type.

has_delete_permission(request, obj=None)[source]

Return True if the given request has permission to delete the given Django model instance, the default implementation doesn’t examine the obj parameter.

Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.

has_view_permission(request, obj=None)[source]

Only show view permissinos to users with superuser and staff flags

get_queryset(request)[source]

Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view.