flows: fix default-source-enrollment-if-username expression

This commit is contained in:
Jens Langhammer 2020-07-09 00:19:12 +02:00
parent 32d5c26577
commit 9518cefdd7
2 changed files with 2 additions and 4 deletions

View File

@ -1,4 +1,3 @@
{% if messages %}
<ul class="pf-c-alert-group pf-m-toast"> <ul class="pf-c-alert-group pf-m-toast">
{% for msg in messages %} {% for msg in messages %}
<li class="pf-c-alert-group__item"> <li class="pf-c-alert-group__item">
@ -21,4 +20,3 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %}

View File

@ -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 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) # is in a SSO Flow (meaning they come from an external IdP)
return pb_is_sso_flow""" 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 # 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( def create_default_source_enrollment_flow(