📅  最后修改于: 2022-03-11 14:46:12.697000             🧑  作者: Mango
class UserAdmin(BaseUserAdmin):
...
def has_add_permission(self, request, obj=None):
return request.user.is_superuser
def has_delete_permission(self, request, obj=None):
return request.user.is_superuser