Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blueprints: adjust wording on managed field #5558

Merged
merged 2 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,15 @@ class Migration(migrations.Migration):
name="name",
field=models.TextField(unique=True),
),
migrations.AlterField(
model_name="blueprintinstance",
name="managed",
field=models.TextField(
default=None,
help_text="Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update.",
null=True,
unique=True,
verbose_name="Managed by authentik",
),
),
]
6 changes: 3 additions & 3 deletions authentik/blueprints/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ class BlueprintRetrievalFailed(SentryIgnoredException):


class ManagedModel(models.Model):
"""Model which can be managed by authentik exclusively"""
"""Model that can be managed by authentik exclusively"""

managed = models.TextField(
default=None,
null=True,
verbose_name=_("Managed by authentik"),
help_text=_(
"Objects which are managed by authentik. These objects are created and updated "
"automatically. This is flag only indicates that an object can be overwritten by "
"Objects that are managed by authentik. These objects are created and updated "
"automatically. This flag only indicates that an object can be overwritten by "
"migrations. You can still modify the objects via the API, but expect changes "
"to be overwritten in a later update."
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,37 @@ class Migration(migrations.Migration):
field=models.BooleanField(default=False),
),
migrations.RunPython(backport_is_backchannel),
migrations.AlterField(
model_name="propertymapping",
name="managed",
field=models.TextField(
default=None,
help_text="Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update.",
null=True,
unique=True,
verbose_name="Managed by authentik",
),
),
migrations.AlterField(
model_name="source",
name="managed",
field=models.TextField(
default=None,
help_text="Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update.",
null=True,
unique=True,
verbose_name="Managed by authentik",
),
),
migrations.AlterField(
model_name="token",
name="managed",
field=models.TextField(
default=None,
help_text="Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update.",
null=True,
unique=True,
verbose_name="Managed by authentik",
),
),
]
2 changes: 2 additions & 0 deletions authentik/core/tests/test_token_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def test_token_create_non_expiring(self):

def test_list(self):
"""Test Token List (Test normal authentication)"""
Token.objects.all().delete()
token_should: Token = Token.objects.create(
identifier="test", expiring=False, user=self.user
)
Expand All @@ -88,6 +89,7 @@ def test_list(self):

def test_list_admin(self):
"""Test Token List (Test with admin auth)"""
Token.objects.all().delete()
self.client.force_login(self.admin)
token_should: Token = Token.objects.create(
identifier="test", expiring=False, user=self.user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,15 @@ class Migration(migrations.Migration):
name="name",
field=models.TextField(unique=True),
),
migrations.AlterField(
model_name="certificatekeypair",
name="managed",
field=models.TextField(
default=None,
help_text="Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update.",
null=True,
unique=True,
verbose_name="Managed by authentik",
),
),
]
11 changes: 11 additions & 0 deletions authentik/outposts/migrations/0020_alter_outpost_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,15 @@ class Migration(migrations.Migration):
default="proxy",
),
),
migrations.AlterField(
model_name="outpost",
name="managed",
field=models.TextField(
default=None,
help_text="Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update.",
null=True,
unique=True,
verbose_name="Managed by authentik",
),
),
]
12 changes: 6 additions & 6 deletions blueprints/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3068,7 +3068,7 @@
],
"minLength": 1,
"title": "Managed by authentik",
"description": "Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update."
"description": "Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update."
}
},
"required": []
Expand Down Expand Up @@ -3544,7 +3544,7 @@
],
"minLength": 1,
"title": "Managed by authentik",
"description": "Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update."
"description": "Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update."
},
"name": {
"type": "string",
Expand Down Expand Up @@ -4525,7 +4525,7 @@
],
"minLength": 1,
"title": "Managed by authentik",
"description": "Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update."
"description": "Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update."
},
"name": {
"type": "string",
Expand Down Expand Up @@ -4609,7 +4609,7 @@
],
"minLength": 1,
"title": "Managed by authentik",
"description": "Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update."
"description": "Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update."
},
"name": {
"type": "string",
Expand Down Expand Up @@ -4792,7 +4792,7 @@
],
"minLength": 1,
"title": "Managed by authentik",
"description": "Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update."
"description": "Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update."
},
"name": {
"type": "string",
Expand Down Expand Up @@ -8267,7 +8267,7 @@
],
"minLength": 1,
"title": "Managed by authentik",
"description": "Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update."
"description": "Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update."
},
"identifier": {
"type": "string",
Expand Down
Loading