stages/consent: default to expiring consent instead of always_require
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
9770ba07c2
commit
5026cebf02
|
@ -0,0 +1,25 @@
|
||||||
|
# Generated by Django 4.1.1 on 2022-09-10 11:23
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("authentik_stages_consent", "0004_alter_userconsent_unique_together_and_more"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="consentstage",
|
||||||
|
name="mode",
|
||||||
|
field=models.TextField(
|
||||||
|
choices=[
|
||||||
|
("always_require", "Always Require"),
|
||||||
|
("permanent", "Permanent"),
|
||||||
|
("expiring", "Expiring"),
|
||||||
|
],
|
||||||
|
default="expiring",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
|
@ -22,7 +22,7 @@ class ConsentMode(models.TextChoices):
|
||||||
class ConsentStage(Stage):
|
class ConsentStage(Stage):
|
||||||
"""Prompt the user for confirmation."""
|
"""Prompt the user for confirmation."""
|
||||||
|
|
||||||
mode = models.TextField(choices=ConsentMode.choices, default=ConsentMode.ALWAYS_REQUIRE)
|
mode = models.TextField(choices=ConsentMode.choices, default=ConsentMode.EXPIRING)
|
||||||
consent_expire_in = models.TextField(
|
consent_expire_in = models.TextField(
|
||||||
validators=[timedelta_string_validator],
|
validators=[timedelta_string_validator],
|
||||||
default="weeks=4",
|
default="weeks=4",
|
||||||
|
|
|
@ -10,9 +10,11 @@ entries:
|
||||||
slug: default-provider-authorization-explicit-consent
|
slug: default-provider-authorization-explicit-consent
|
||||||
model: authentik_flows.flow
|
model: authentik_flows.flow
|
||||||
id: flow
|
id: flow
|
||||||
- identifiers:
|
- id: default-provider-authorization-consent
|
||||||
|
attrs:
|
||||||
|
mode: expiring
|
||||||
|
identifiers:
|
||||||
name: default-provider-authorization-consent
|
name: default-provider-authorization-consent
|
||||||
id: default-provider-authorization-consent
|
|
||||||
model: authentik_stages_consent.consentstage
|
model: authentik_stages_consent.consentstage
|
||||||
- identifiers:
|
- identifiers:
|
||||||
order: 0
|
order: 0
|
||||||
|
|
Reference in New Issue