flows: remove generic "password change" designation and add setup_stage
This commit is contained in:
parent
e75e71a5ce
commit
b8654c06bf
|
@ -27,7 +27,7 @@
|
||||||
<table class="pf-c-table pf-m-compact pf-m-grid-xl" role="grid">
|
<table class="pf-c-table pf-m-compact pf-m-grid-xl" role="grid">
|
||||||
<thead>
|
<thead>
|
||||||
<tr role="row">
|
<tr role="row">
|
||||||
<th role="columnheader" scope="col">{% trans 'Name' %}</th>
|
<th role="columnheader" scope="col">{% trans 'Identifier' %}</th>
|
||||||
<th role="columnheader" scope="col">{% trans 'Designation' %}</th>
|
<th role="columnheader" scope="col">{% trans 'Designation' %}</th>
|
||||||
<th role="columnheader" scope="col">{% trans 'Stages' %}</th>
|
<th role="columnheader" scope="col">{% trans 'Stages' %}</th>
|
||||||
<th role="columnheader" scope="col">{% trans 'Policies' %}</th>
|
<th role="columnheader" scope="col">{% trans 'Policies' %}</th>
|
||||||
|
@ -39,8 +39,8 @@
|
||||||
<tr role="row">
|
<tr role="row">
|
||||||
<th role="columnheader">
|
<th role="columnheader">
|
||||||
<div>
|
<div>
|
||||||
<div>{{ flow.name }}</div>
|
<div>{{ flow.slug }}</div>
|
||||||
<small>{{ flow.slug }}</small>
|
<small>{{ flow.name }}</small>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<td role="cell">
|
<td role="cell">
|
||||||
|
|
|
@ -38,9 +38,7 @@ def user_sources(context: RequestContext) -> List[UIUserSettings]:
|
||||||
user_settings = source.ui_user_settings
|
user_settings = source.ui_user_settings
|
||||||
if not user_settings:
|
if not user_settings:
|
||||||
continue
|
continue
|
||||||
policy_engine = PolicyEngine(
|
policy_engine = PolicyEngine(source, user, context.get("request"))
|
||||||
source.policies.all(), user, context.get("request")
|
|
||||||
)
|
|
||||||
policy_engine.build()
|
policy_engine.build()
|
||||||
if policy_engine.passing:
|
if policy_engine.passing:
|
||||||
matching_sources.append(user_settings)
|
matching_sources.append(user_settings)
|
||||||
|
|
29
passbook/flows/migrations/0006_auto_20200629_0857.py
Normal file
29
passbook/flows/migrations/0006_auto_20200629_0857.py
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# Generated by Django 3.0.7 on 2020-06-29 08:57
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("passbook_flows", "0005_provider_flows"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="flow",
|
||||||
|
name="designation",
|
||||||
|
field=models.CharField(
|
||||||
|
choices=[
|
||||||
|
("authentication", "Authentication"),
|
||||||
|
("authorization", "Authorization"),
|
||||||
|
("invalidation", "Invalidation"),
|
||||||
|
("enrollment", "Enrollment"),
|
||||||
|
("unenrollment", "Unrenollment"),
|
||||||
|
("recovery", "Recovery"),
|
||||||
|
("stage_setup", "Stage Setup"),
|
||||||
|
],
|
||||||
|
max_length=100,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
|
@ -25,7 +25,7 @@ class FlowDesignation(models.TextChoices):
|
||||||
ENROLLMENT = "enrollment"
|
ENROLLMENT = "enrollment"
|
||||||
UNRENOLLMENT = "unenrollment"
|
UNRENOLLMENT = "unenrollment"
|
||||||
RECOVERY = "recovery"
|
RECOVERY = "recovery"
|
||||||
PASSWORD_CHANGE = "password_change" # nosec # noqa
|
STAGE_SETUP = "stage_setup"
|
||||||
|
|
||||||
|
|
||||||
class Stage(models.Model):
|
class Stage(models.Model):
|
||||||
|
|
|
@ -36,11 +36,6 @@ urlpatterns = [
|
||||||
ToDefaultFlow.as_view(designation=FlowDesignation.UNRENOLLMENT),
|
ToDefaultFlow.as_view(designation=FlowDesignation.UNRENOLLMENT),
|
||||||
name="default-unenrollment",
|
name="default-unenrollment",
|
||||||
),
|
),
|
||||||
path(
|
|
||||||
"-/default/password_change/",
|
|
||||||
ToDefaultFlow.as_view(designation=FlowDesignation.PASSWORD_CHANGE),
|
|
||||||
name="default-password-change",
|
|
||||||
),
|
|
||||||
path("b/<slug:flow_slug>/", FlowExecutorView.as_view(), name="flow-executor"),
|
path("b/<slug:flow_slug>/", FlowExecutorView.as_view(), name="flow-executor"),
|
||||||
path(
|
path(
|
||||||
"<slug:flow_slug>/", FlowExecutorShellView.as_view(), name="flow-executor-shell"
|
"<slug:flow_slug>/", FlowExecutorShellView.as_view(), name="flow-executor-shell"
|
||||||
|
|
|
@ -5177,7 +5177,7 @@ definitions:
|
||||||
- enrollment
|
- enrollment
|
||||||
- unenrollment
|
- unenrollment
|
||||||
- recovery
|
- recovery
|
||||||
- password_change
|
- stage_setup
|
||||||
stages:
|
stages:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
|
Reference in a new issue