From 1fd949d4ecb9fa79a2ea0b0b9c4f7b9652592e8c Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 23 Mar 2021 18:09:13 +0100 Subject: [PATCH] flows: remove FlowExecutorShellView Signed-off-by: Jens Langhammer --- .../core/templates/{shell.html => if/admin.html} | 0 .../shell.html => core/templates/if/flow.html} | 0 authentik/core/urls.py | 5 ++--- authentik/flows/views.py | 13 +------------ 4 files changed, 3 insertions(+), 15 deletions(-) rename authentik/core/templates/{shell.html => if/admin.html} (100%) rename authentik/{flows/templates/flows/shell.html => core/templates/if/flow.html} (100%) diff --git a/authentik/core/templates/shell.html b/authentik/core/templates/if/admin.html similarity index 100% rename from authentik/core/templates/shell.html rename to authentik/core/templates/if/admin.html diff --git a/authentik/flows/templates/flows/shell.html b/authentik/core/templates/if/flow.html similarity index 100% rename from authentik/flows/templates/flows/shell.html rename to authentik/core/templates/if/flow.html diff --git a/authentik/core/urls.py b/authentik/core/urls.py index d104f4c32..ee03d748c 100644 --- a/authentik/core/urls.py +++ b/authentik/core/urls.py @@ -6,7 +6,6 @@ from django.views.generic import RedirectView from django.views.generic.base import TemplateView from authentik.core.views import impersonate, user -from authentik.flows.views import FlowExecutorShellView urlpatterns = [ path( @@ -40,12 +39,12 @@ urlpatterns = [ # Interfaces path( "if/admin/", - ensure_csrf_cookie(TemplateView.as_view(template_name="shell.html")), + ensure_csrf_cookie(TemplateView.as_view(template_name="if/admin.html")), name="if-admin", ), path( "if/flow//", - ensure_csrf_cookie(FlowExecutorShellView.as_view()), + ensure_csrf_cookie(TemplateView.as_view(template_name="if/flow.html")), name="if-flow", ), ] diff --git a/authentik/flows/views.py b/authentik/flows/views.py index e188d9e73..5cd4370dc 100644 --- a/authentik/flows/views.py +++ b/authentik/flows/views.py @@ -8,7 +8,7 @@ from django.shortcuts import get_object_or_404, redirect from django.template.response import TemplateResponse from django.utils.decorators import method_decorator from django.views.decorators.clickjacking import xframe_options_sameorigin -from django.views.generic import TemplateView, View +from django.views.generic import View from drf_yasg2.utils import no_body, swagger_auto_schema from rest_framework.permissions import AllowAny from rest_framework.views import APIView @@ -262,17 +262,6 @@ class FlowErrorResponse(TemplateResponse): return context -class FlowExecutorShellView(TemplateView): - """Executor Shell view, loads a dummy card with a spinner - that loads the next stage in the background.""" - - template_name = "flows/shell.html" - - def get_context_data(self, **kwargs) -> dict[str, Any]: - self.request.session[SESSION_KEY_GET] = self.request.GET - return super().get_context_data(**kwargs) - - class CancelView(View): """View which canels the currently active plan"""