From 9dd6b7d43693c0e602624c53b9db3d7ca9952f61 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 29 May 2021 18:14:37 +0200 Subject: [PATCH] flows: remove default-enrollment Signed-off-by: Jens Langhammer --- authentik/flows/urls.py | 5 --- ...thenticatorvalidatestage_device_classes.py | 33 +++++++++++++++++++ authentik/tenants/api.py | 1 - authentik/tenants/migrations/0001_initial.py | 11 +------ authentik/tenants/models.py | 3 -- schema.yml | 12 ------- 6 files changed, 34 insertions(+), 31 deletions(-) create mode 100644 authentik/stages/authenticator_validate/migrations/0008_alter_authenticatorvalidatestage_device_classes.py diff --git a/authentik/flows/urls.py b/authentik/flows/urls.py index 12bbbfc0d..241eb3c5f 100644 --- a/authentik/flows/urls.py +++ b/authentik/flows/urls.py @@ -21,11 +21,6 @@ urlpatterns = [ ToDefaultFlow.as_view(designation=FlowDesignation.RECOVERY), name="default-recovery", ), - path( - "-/default/enrollment/", - ToDefaultFlow.as_view(designation=FlowDesignation.ENROLLMENT), - name="default-enrollment", - ), path( "-/default/unenrollment/", ToDefaultFlow.as_view(designation=FlowDesignation.UNRENOLLMENT), diff --git a/authentik/stages/authenticator_validate/migrations/0008_alter_authenticatorvalidatestage_device_classes.py b/authentik/stages/authenticator_validate/migrations/0008_alter_authenticatorvalidatestage_device_classes.py new file mode 100644 index 000000000..d33dadd44 --- /dev/null +++ b/authentik/stages/authenticator_validate/migrations/0008_alter_authenticatorvalidatestage_device_classes.py @@ -0,0 +1,33 @@ +# Generated by Django 3.2.3 on 2021-05-29 16:10 + +import django.contrib.postgres.fields +from django.db import migrations, models + +import authentik.stages.authenticator_validate.models + + +class Migration(migrations.Migration): + + dependencies = [ + ("authentik_stages_authenticator_validate", "0007_auto_20210403_0927"), + ] + + operations = [ + migrations.AlterField( + model_name="authenticatorvalidatestage", + name="device_classes", + field=django.contrib.postgres.fields.ArrayField( + base_field=models.TextField( + choices=[ + ("static", "Static"), + ("totp", "TOTP"), + ("webauthn", "WebAuthn"), + ("duo", "Duo"), + ] + ), + default=authentik.stages.authenticator_validate.models.default_device_classes, + help_text="Device classes which can be used to authenticate", + size=None, + ), + ), + ] diff --git a/authentik/tenants/api.py b/authentik/tenants/api.py index 5aa8b31e5..5af88344b 100644 --- a/authentik/tenants/api.py +++ b/authentik/tenants/api.py @@ -35,7 +35,6 @@ class TenantSerializer(ModelSerializer): "flow_authentication", "flow_invalidation", "flow_recovery", - "flow_enrollment", "flow_unenrollment", ] diff --git a/authentik/tenants/migrations/0001_initial.py b/authentik/tenants/migrations/0001_initial.py index 3f0abc978..c2dee9a05 100644 --- a/authentik/tenants/migrations/0001_initial.py +++ b/authentik/tenants/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.3 on 2021-05-29 12:18 +# Generated by Django 3.2.3 on 2021-05-29 16:10 import uuid @@ -50,15 +50,6 @@ class Migration(migrations.Migration): to="authentik_flows.flow", ), ), - ( - "flow_enrollment", - models.ForeignKey( - null=True, - on_delete=django.db.models.deletion.SET_NULL, - related_name="tenant_enrollment", - to="authentik_flows.flow", - ), - ), ( "flow_invalidation", models.ForeignKey( diff --git a/authentik/tenants/models.py b/authentik/tenants/models.py index 342db514b..9ad6b5db1 100644 --- a/authentik/tenants/models.py +++ b/authentik/tenants/models.py @@ -35,9 +35,6 @@ class Tenant(models.Model): flow_recovery = models.ForeignKey( Flow, null=True, on_delete=models.SET_NULL, related_name="tenant_recovery" ) - flow_enrollment = models.ForeignKey( - Flow, null=True, on_delete=models.SET_NULL, related_name="tenant_enrollment" - ) flow_unenrollment = models.ForeignKey( Flow, null=True, on_delete=models.SET_NULL, related_name="tenant_unenrollment" ) diff --git a/schema.yml b/schema.yml index 17dad63b6..0f26f9a91 100644 --- a/schema.yml +++ b/schema.yml @@ -23125,10 +23125,6 @@ components: type: string format: uuid nullable: true - flow_enrollment: - type: string - format: uuid - nullable: true flow_unenrollment: type: string format: uuid @@ -25112,10 +25108,6 @@ components: type: string format: uuid nullable: true - flow_enrollment: - type: string - format: uuid - nullable: true flow_unenrollment: type: string format: uuid @@ -25149,10 +25141,6 @@ components: type: string format: uuid nullable: true - flow_enrollment: - type: string - format: uuid - nullable: true flow_unenrollment: type: string format: uuid