diff --git a/passbook/admin/templates/administration/flow/list.html b/passbook/admin/templates/administration/flow/list.html index 2e913d5d5..c013e9348 100644 --- a/passbook/admin/templates/administration/flow/list.html +++ b/passbook/admin/templates/administration/flow/list.html @@ -27,7 +27,7 @@ - + @@ -39,8 +39,8 @@
{% trans 'Name' %}{% trans 'Identifier' %} {% trans 'Designation' %} {% trans 'Stages' %} {% trans 'Policies' %}
-
{{ flow.name }}
- {{ flow.slug }} +
{{ flow.slug }}
+ {{ flow.name }}
diff --git a/passbook/core/templatetags/passbook_user_settings.py b/passbook/core/templatetags/passbook_user_settings.py index 7c0287eec..1af1b9c97 100644 --- a/passbook/core/templatetags/passbook_user_settings.py +++ b/passbook/core/templatetags/passbook_user_settings.py @@ -38,9 +38,7 @@ def user_sources(context: RequestContext) -> List[UIUserSettings]: user_settings = source.ui_user_settings if not user_settings: continue - policy_engine = PolicyEngine( - source.policies.all(), user, context.get("request") - ) + policy_engine = PolicyEngine(source, user, context.get("request")) policy_engine.build() if policy_engine.passing: matching_sources.append(user_settings) diff --git a/passbook/flows/migrations/0006_auto_20200629_0857.py b/passbook/flows/migrations/0006_auto_20200629_0857.py new file mode 100644 index 000000000..2a917c35f --- /dev/null +++ b/passbook/flows/migrations/0006_auto_20200629_0857.py @@ -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, + ), + ), + ] diff --git a/passbook/flows/models.py b/passbook/flows/models.py index d049a6885..44ea86c91 100644 --- a/passbook/flows/models.py +++ b/passbook/flows/models.py @@ -25,7 +25,7 @@ class FlowDesignation(models.TextChoices): ENROLLMENT = "enrollment" UNRENOLLMENT = "unenrollment" RECOVERY = "recovery" - PASSWORD_CHANGE = "password_change" # nosec # noqa + STAGE_SETUP = "stage_setup" class Stage(models.Model): diff --git a/passbook/flows/urls.py b/passbook/flows/urls.py index c1a50a526..ca83335f7 100644 --- a/passbook/flows/urls.py +++ b/passbook/flows/urls.py @@ -36,11 +36,6 @@ urlpatterns = [ ToDefaultFlow.as_view(designation=FlowDesignation.UNRENOLLMENT), name="default-unenrollment", ), - path( - "-/default/password_change/", - ToDefaultFlow.as_view(designation=FlowDesignation.PASSWORD_CHANGE), - name="default-password-change", - ), path("b//", FlowExecutorView.as_view(), name="flow-executor"), path( "/", FlowExecutorShellView.as_view(), name="flow-executor-shell" diff --git a/swagger.yaml b/swagger.yaml index c891e99e8..8a11bd93f 100755 --- a/swagger.yaml +++ b/swagger.yaml @@ -5177,7 +5177,7 @@ definitions: - enrollment - unenrollment - recovery - - password_change + - stage_setup stages: type: array items: