diff --git a/ansible_base/api_documentation/apps.py b/ansible_base/api_documentation/apps.py index 3d0b98a2c..856a04af4 100644 --- a/ansible_base/api_documentation/apps.py +++ b/ansible_base/api_documentation/apps.py @@ -4,3 +4,4 @@ class ApiDocumentationConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'ansible_base.api_documentation' + label = 'dab_api_documentation' diff --git a/ansible_base/authentication/apps.py b/ansible_base/authentication/apps.py index 310656630..aa367c939 100644 --- a/ansible_base/authentication/apps.py +++ b/ansible_base/authentication/apps.py @@ -6,4 +6,5 @@ class AuthenticationConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'ansible_base.authentication' + label = 'dab_authentication' verbose_name = 'Pluggable Authentication' diff --git a/ansible_base/authentication/migrations/0001_initial.py b/ansible_base/authentication/migrations/0001_initial.py index 6257d55ca..a34eb77b2 100644 --- a/ansible_base/authentication/migrations/0001_initial.py +++ b/ansible_base/authentication/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.6 on 2024-01-15 10:49 +# Generated by Django 4.2.6 on 2024-01-18 20:16 from django.conf import settings from django.db import migrations, models @@ -26,14 +26,14 @@ class Migration(migrations.Migration): ('create_objects', models.BooleanField(default=True, help_text='Allow authenticator to create objects (users, teams, organizations)')), ('users_unique', models.BooleanField(default=False, help_text='Are users from this source the same as users from another source with the same id')), ('remove_users', models.BooleanField(default=True, help_text='When a user authenticates from this source should they be removed from any other groups they were previously added to')), - ('configuration', models.JSONField(default=dict, blank=True, help_text='The required configuration for this source')), + ('configuration', models.JSONField(blank=True, default=dict, help_text='The required configuration for this source')), ('type', models.CharField(editable=False, help_text='The type of authentication service this is', max_length=256)), ('order', models.IntegerField(default=1, help_text='The order in which an authenticator will be tried. This only pertains to username/password authenticators')), ('slug', models.SlugField(default=None, editable=False, help_text='An immutable identifier for the authenticator', max_length=1024, unique=True)), ('category', models.CharField(default=None, help_text='The base type of this authenticator', max_length=30)), ('created_by', models.ForeignKey(default=None, editable=False, help_text='The user who created this resource', null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='%(app_label)s_%(class)s_created+', to=settings.AUTH_USER_MODEL)), ('modified_by', models.ForeignKey(default=None, editable=False, help_text='The user who last modified this resource', null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='%(app_label)s_%(class)s_modified+', to=settings.AUTH_USER_MODEL)), - ('users', models.ManyToManyField(help_text='The list of users who have authenticated from this authenticator', blank=True, related_name='users', to=settings.AUTH_USER_MODEL)), + ('users', models.ManyToManyField(blank=True, help_text='The list of users who have authenticated from this authenticator', related_name='users', to=settings.AUTH_USER_MODEL)), ], options={ 'abstract': False, @@ -48,11 +48,11 @@ class Migration(migrations.Migration): ('name', models.CharField(help_text='The name of this resource', max_length=512)), ('revoke', models.BooleanField(default=False, help_text='If a user does not meet this rule should we revoke the permission')), ('map_type', models.CharField(choices=[('team', 'team'), ('is_superuser', 'is_superuser'), ('is_system_auditor', 'is_system_auditor'), ('allow', 'allow'), ('organization', 'organization')], default='team', help_text='What does the map work on, a team, a user flag or is this an allow rule', max_length=17)), - ('team', models.CharField(default=None, blank=True, help_text='A team name this rule works on', max_length=512, null=True)), - ('organization', models.CharField(default=None, blank=True, help_text='An organization name this rule works on', max_length=512, null=True)), - ('triggers', models.JSONField(default=dict, blank=True, help_text='Trigger information for this rule')), + ('team', models.CharField(blank=True, default=None, help_text='A team name this rule works on', max_length=512, null=True)), + ('organization', models.CharField(blank=True, default=None, help_text='An organization name this rule works on', max_length=512, null=True)), + ('triggers', models.JSONField(blank=True, default=dict, help_text='Trigger information for this rule')), ('order', models.PositiveIntegerField(default=0, help_text='The order in which this rule should be processed, smaller numbers are of higher precedence. Items with the same order will be executed in random order')), - ('authenticator', models.ForeignKey(help_text='The authenticator this mapping belongs to', on_delete=django.db.models.deletion.CASCADE, to='authentication.authenticator')), + ('authenticator', models.ForeignKey(help_text='The authenticator this mapping belongs to', on_delete=django.db.models.deletion.CASCADE, to='dab_authentication.authenticator')), ('created_by', models.ForeignKey(default=None, editable=False, help_text='The user who created this resource', null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='%(app_label)s_%(class)s_created+', to=settings.AUTH_USER_MODEL)), ('modified_by', models.ForeignKey(default=None, editable=False, help_text='The user who last modified this resource', null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='%(app_label)s_%(class)s_modified+', to=settings.AUTH_USER_MODEL)), ], @@ -65,10 +65,10 @@ class Migration(migrations.Migration): ('extra_data', models.JSONField(default=dict)), ('created', models.DateTimeField(auto_now_add=True)), ('modified', models.DateTimeField(auto_now=True)), - ('claims', models.JSONField(default=dict, blank=True)), - ('last_login_map_results', models.JSONField(default=list, blank=True)), + ('claims', models.JSONField(blank=True, default=dict)), + ('last_login_map_results', models.JSONField(blank=True, default=list)), ('access_allowed', models.BooleanField(default=None, null=True)), - ('provider', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='authenticator_user', to='authentication.authenticator', to_field='slug')), + ('provider', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='authenticator_user', to='dab_authentication.authenticator', to_field='slug')), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='authenticator_user', to=settings.AUTH_USER_MODEL)), ], options={ @@ -78,11 +78,11 @@ class Migration(migrations.Migration): ), migrations.AddConstraint( model_name='authenticatormap', - constraint=models.CheckConstraint(check=models.Q(models.Q(('map_type', 'team'), _negated=True), models.Q(('team__isnull', False), ('organization__isnull', False)), _connector='OR'), name='authentication_authenticatormap_require_org_team_if_team_map'), + constraint=models.CheckConstraint(check=models.Q(models.Q(('map_type', 'team'), _negated=True), models.Q(('team__isnull', False), ('organization__isnull', False)), _connector='OR'), name='dab_authentication_authenticatormap_require_org_team_if_team_map'), ), migrations.AddConstraint( model_name='authenticatormap', - constraint=models.CheckConstraint(check=models.Q(models.Q(('map_type', 'organization'), _negated=True), ('organization__isnull', False), _connector='OR'), name='authentication_authenticatormap_require_org_if_org_map'), + constraint=models.CheckConstraint(check=models.Q(models.Q(('map_type', 'organization'), _negated=True), ('organization__isnull', False), _connector='OR'), name='dab_authentication_authenticatormap_require_org_if_org_map'), ), migrations.AlterUniqueTogether( name='authenticatormap', diff --git a/ansible_base/rest_filters/apps.py b/ansible_base/rest_filters/apps.py index d393878d7..57bcad416 100644 --- a/ansible_base/rest_filters/apps.py +++ b/ansible_base/rest_filters/apps.py @@ -6,3 +6,4 @@ class AuthenticationConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'ansible_base.rest_filters' + label = 'dab_rest_filters'