stages/consent: add fallback template
This commit is contained in:
parent
2831df45a0
commit
c4a30c50ac
|
@ -20,9 +20,7 @@ from passbook.outposts.models import (
|
|||
OutpostConfig,
|
||||
OutpostDeploymentType,
|
||||
OutpostType,
|
||||
default_outpost_config,
|
||||
)
|
||||
from passbook.providers.proxy.controllers.docker import ProxyDockerController
|
||||
from passbook.providers.proxy.models import ProxyProvider
|
||||
|
||||
|
||||
|
|
|
@ -27,11 +27,10 @@ class ConsentStageView(FormView, StageView):
|
|||
|
||||
def get_template_names(self) -> List[str]:
|
||||
# PLAN_CONTEXT_CONSENT_TEMPLATE has to be set by a template that calls this stage
|
||||
# TODO: Add a default template in case a user directly implements this stage
|
||||
if PLAN_CONTEXT_CONSENT_TEMPLATE in self.executor.plan.context:
|
||||
template_name = self.executor.plan.context[PLAN_CONTEXT_CONSENT_TEMPLATE]
|
||||
return [template_name]
|
||||
return super().get_template_names()
|
||||
return ["stages/consent/fallback.html"]
|
||||
|
||||
def get(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
||||
current_stage: ConsentStage = self.executor.current_stage
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
{% extends 'login/form_with_user.html' %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block beneath_form %}
|
||||
<div class="pf-c-form__group">
|
||||
{{ hidden_inputs }}
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -6087,7 +6087,7 @@ definitions:
|
|||
readOnly: true
|
||||
user:
|
||||
title: User
|
||||
type: string
|
||||
type: object
|
||||
action:
|
||||
title: Action
|
||||
type: string
|
||||
|
@ -6119,7 +6119,7 @@ definitions:
|
|||
minLength: 1
|
||||
context:
|
||||
title: Context
|
||||
type: string
|
||||
type: object
|
||||
client_ip:
|
||||
title: Client ip
|
||||
type: string
|
||||
|
@ -6211,7 +6211,7 @@ definitions:
|
|||
uniqueItems: true
|
||||
attributes:
|
||||
title: Attributes
|
||||
type: string
|
||||
type: object
|
||||
Token:
|
||||
required:
|
||||
- identifier
|
||||
|
@ -7707,7 +7707,7 @@ definitions:
|
|||
x-nullable: true
|
||||
fixed_data:
|
||||
title: Fixed data
|
||||
type: string
|
||||
type: object
|
||||
OTPStaticStage:
|
||||
required:
|
||||
- name
|
||||
|
|
Reference in a new issue