From 34a960505d5e349fdba99710cbf079e4f9d7ea69 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 31 Jul 2023 14:28:50 -0400 Subject: [PATCH] Remove obsolete AdminGroup and AdminUser models (#12589) --- netbox/users/migrations/0001_squashed_0011.py | 30 ------------------- netbox/users/models.py | 21 +------------ 2 files changed, 1 insertion(+), 50 deletions(-) diff --git a/netbox/users/migrations/0001_squashed_0011.py b/netbox/users/migrations/0001_squashed_0011.py index e9f66f83a..4c0f78bef 100644 --- a/netbox/users/migrations/0001_squashed_0011.py +++ b/netbox/users/migrations/0001_squashed_0011.py @@ -31,36 +31,6 @@ class Migration(migrations.Migration): ] operations = [ - migrations.CreateModel( - name='AdminGroup', - fields=[ - ], - options={ - 'verbose_name': 'Group', - 'proxy': True, - 'indexes': [], - 'constraints': [], - }, - bases=('auth.group',), - managers=[ - ('objects', django.contrib.auth.models.GroupManager()), - ], - ), - migrations.CreateModel( - name='AdminUser', - fields=[ - ], - options={ - 'verbose_name': 'User', - 'proxy': True, - 'indexes': [], - 'constraints': [], - }, - bases=('auth.user',), - managers=[ - ('objects', django.contrib.auth.models.UserManager()), - ], - ), migrations.CreateModel( name='UserConfig', fields=[ diff --git a/netbox/users/models.py b/netbox/users/models.py index 6cd4ed487..2b408a8af 100644 --- a/netbox/users/models.py +++ b/netbox/users/models.py @@ -30,28 +30,9 @@ __all__ = ( # -# Proxy models for admin +# Proxies for Django's User and Group models # - -class AdminGroup(Group): - """ - Proxy contrib.auth.models.Group for the admin UI - """ - class Meta: - verbose_name = _('Group') - proxy = True - - -class AdminUser(User): - """ - Proxy contrib.auth.models.User for the admin UI - """ - class Meta: - verbose_name = _('User') - proxy = True - - class NetBoxUserManager(UserManager.from_queryset(RestrictedQuerySet)): pass