Skip to content

Commit

Permalink
Adding labels of dab_ to apps
Browse files Browse the repository at this point in the history
  • Loading branch information
john-westcott-iv committed Jan 19, 2024
1 parent a334237 commit 767e80d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions ansible_base/api_documentation/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
class ApiDocumentationConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'ansible_base.api_documentation'
label = 'dab_api_documentation'
1 change: 1 addition & 0 deletions ansible_base/authentication/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
24 changes: 12 additions & 12 deletions ansible_base/authentication/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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)),
],
Expand All @@ -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={
Expand All @@ -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',
Expand Down
1 change: 1 addition & 0 deletions ansible_base/rest_filters/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
class AuthenticationConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'ansible_base.rest_filters'
label = 'dab_rest_filters'

0 comments on commit 767e80d

Please sign in to comment.