fix friendly name not allowing blank, fix static authenticator stage's name
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
ac8145c249
commit
9f685c5da6
|
@ -276,7 +276,7 @@ class ConfigurableStage(models.Model):
|
|||
class FriendlyNamedStage(models.Model):
|
||||
"""Abstract base class for a Stage that can have a user friendly name configured."""
|
||||
|
||||
friendly_name = models.TextField(null=True)
|
||||
friendly_name = models.TextField(null=True, blank=True)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
|
|
@ -15,6 +15,6 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name="authenticatorduostage",
|
||||
name="friendly_name",
|
||||
field=models.TextField(null=True),
|
||||
field=models.TextField(null=True, blank=True),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -5,7 +5,7 @@ from django_filters.rest_framework.backends import DjangoFilterBackend
|
|||
from drf_spectacular.utils import OpenApiResponse, extend_schema, inline_serializer
|
||||
from rest_framework import mixins
|
||||
from rest_framework.decorators import action
|
||||
from rest_framework.fields import CharField, ChoiceField, JSONField, UUIDField, DateTimeField
|
||||
from rest_framework.fields import CharField, ChoiceField, DateTimeField, JSONField, UUIDField
|
||||
from rest_framework.filters import OrderingFilter, SearchFilter
|
||||
from rest_framework.permissions import IsAdminUser
|
||||
from rest_framework.request import Request
|
||||
|
|
|
@ -33,7 +33,7 @@ class Migration(migrations.Migration):
|
|||
to="authentik_flows.stage",
|
||||
),
|
||||
),
|
||||
("friendly_name", models.TextField(null=True)),
|
||||
("friendly_name", models.TextField(null=True, blank=True)),
|
||||
(
|
||||
"item_matching_mode",
|
||||
models.TextField(
|
||||
|
|
|
@ -12,6 +12,6 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name="authenticatorsmsstage",
|
||||
name="friendly_name",
|
||||
field=models.TextField(null=True),
|
||||
field=models.TextField(null=True, blank=True),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -12,6 +12,6 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name="authenticatorstaticstage",
|
||||
name="friendly_name",
|
||||
field=models.TextField(null=True),
|
||||
field=models.TextField(null=True, blank=True),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
# Generated by Django 5.0 on 2024-01-03 18:07
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("authentik_stages_authenticator_static", "0009_throttling"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name="authenticatorstaticstage",
|
||||
options={
|
||||
"verbose_name": "Static Authenticator Setup Stage",
|
||||
"verbose_name_plural": "Static Authenticator Setup Stages",
|
||||
},
|
||||
),
|
||||
]
|
|
@ -46,11 +46,11 @@ class AuthenticatorStaticStage(ConfigurableStage, FriendlyNamedStage, Stage):
|
|||
)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"Static Authenticator Stage {self.name}"
|
||||
return f"Static Authenticator Setup Stage {self.name}"
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("Static Authenticator Stage")
|
||||
verbose_name_plural = _("Static Authenticator Stages")
|
||||
verbose_name = _("Static Authenticator Setup Stage")
|
||||
verbose_name_plural = _("Static Authenticator Setup Stages")
|
||||
|
||||
|
||||
class StaticDevice(SerializerModel, ThrottlingMixin, Device):
|
||||
|
|
|
@ -12,6 +12,6 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name="authenticatortotpstage",
|
||||
name="friendly_name",
|
||||
field=models.TextField(null=True),
|
||||
field=models.TextField(null=True, blank=True),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -12,6 +12,6 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name="authenticatewebauthnstage",
|
||||
name="friendly_name",
|
||||
field=models.TextField(null=True),
|
||||
field=models.TextField(null=True, blank=True),
|
||||
),
|
||||
]
|
||||
|
|
Reference in New Issue