Просмотр исходного кода

Remove obsolete AdminGroup and AdminUser models (#12589)

Jeremy Stretch 2 лет назад
Родитель
Сommit
34a960505d
2 измененных файлов с 1 добавлено и 50 удалено
  1. 0 30
      netbox/users/migrations/0001_squashed_0011.py
  2. 1 20
      netbox/users/models.py

+ 0 - 30
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=[

+ 1 - 20
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