From 9518cefdd7a2c2c11922534a4767218d1355f390 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 9 Jul 2020 00:19:12 +0200 Subject: [PATCH] flows: fix default-source-enrollment-if-username expression --- passbook/core/templates/partials/messages.html | 2 -- passbook/flows/migrations/0009_source_flows.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/passbook/core/templates/partials/messages.html b/passbook/core/templates/partials/messages.html index 7d1125eaa..99bafba36 100644 --- a/passbook/core/templates/partials/messages.html +++ b/passbook/core/templates/partials/messages.html @@ -1,4 +1,3 @@ -{% if messages %} -{% endif %} diff --git a/passbook/flows/migrations/0009_source_flows.py b/passbook/flows/migrations/0009_source_flows.py index 6c0e1fcb3..a39e17258 100644 --- a/passbook/flows/migrations/0009_source_flows.py +++ b/passbook/flows/migrations/0009_source_flows.py @@ -10,9 +10,9 @@ from passbook.stages.prompt.models import FieldTypes FLOW_POLICY_EXPRESSION = """# This policy ensures that this flow can only be used when the user # is in a SSO Flow (meaning they come from an external IdP) return pb_is_sso_flow""" -PROMPT_POLICY_EXPRESSION = """# Check if we've been given a username by the external IdP +PROMPT_POLICY_EXPRESSION = """# Check if we've not been given a username by the external IdP # and trigger the enrollment flow -return 'username' in pb_flow_plan.context.get('prompt_data', {})""" +return 'username' not in pb_flow_plan.context.get('prompt_data', {})""" def create_default_source_enrollment_flow(