# -*- coding: utf-8 -*-
from __future__ import annotations

from django.contrib import admin
from django.contrib.auth.admin import UserAdmin

from hotpocket_backend.apps.accounts.models import Account


class AccountAdmin(UserAdmin):
    list_display = (*UserAdmin.list_display, 'is_active')

    def has_delete_permission(self, request, obj=None):
        return request.user.is_superuser


admin.site.register(Account, AccountAdmin)
