From 36c34e05f8ac361e6211ce549e086358b8ba4e89 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 29 Mar 2021 22:31:29 +0200 Subject: [PATCH] stages/authenticator_webuahtn: remove views Signed-off-by: Jens Langhammer --- .../stages/authenticator_webauthn/apps.py | 1 - .../stages/authenticator_webauthn/urls.py | 8 ------ .../stages/authenticator_webauthn/views.py | 25 ------------------- 3 files changed, 34 deletions(-) delete mode 100644 authentik/stages/authenticator_webauthn/urls.py delete mode 100644 authentik/stages/authenticator_webauthn/views.py diff --git a/authentik/stages/authenticator_webauthn/apps.py b/authentik/stages/authenticator_webauthn/apps.py index ec8736525..36a2f3f0d 100644 --- a/authentik/stages/authenticator_webauthn/apps.py +++ b/authentik/stages/authenticator_webauthn/apps.py @@ -8,4 +8,3 @@ class AuthentikStageAuthenticatorWebAuthnConfig(AppConfig): name = "authentik.stages.authenticator_webauthn" label = "authentik_stages_authenticator_webauthn" verbose_name = "authentik Stages.Authenticator.WebAuthn" - mountpoint = "-/user/authenticator/webauthn/" diff --git a/authentik/stages/authenticator_webauthn/urls.py b/authentik/stages/authenticator_webauthn/urls.py deleted file mode 100644 index 7c6148891..000000000 --- a/authentik/stages/authenticator_webauthn/urls.py +++ /dev/null @@ -1,8 +0,0 @@ -"""WebAuthn urls""" -from django.urls import path - -from authentik.stages.authenticator_webauthn.views import DeviceUpdateView - -urlpatterns = [ - path("devices//update/", DeviceUpdateView.as_view(), name="device-update"), -] diff --git a/authentik/stages/authenticator_webauthn/views.py b/authentik/stages/authenticator_webauthn/views.py deleted file mode 100644 index b4db56221..000000000 --- a/authentik/stages/authenticator_webauthn/views.py +++ /dev/null @@ -1,25 +0,0 @@ -"""webauthn views""" -from django.contrib.auth.mixins import LoginRequiredMixin -from django.contrib.messages.views import SuccessMessageMixin -from django.http.response import Http404 -from django.utils.translation import gettext as _ -from django.views.generic import UpdateView - -from authentik.stages.authenticator_webauthn.forms import DeviceEditForm -from authentik.stages.authenticator_webauthn.models import WebAuthnDevice - - -class DeviceUpdateView(SuccessMessageMixin, LoginRequiredMixin, UpdateView): - """Update device""" - - model = WebAuthnDevice - form_class = DeviceEditForm - template_name = "generic/update.html" - success_url = "/" - success_message = _("Successfully updated Device") - - def get_object(self) -> WebAuthnDevice: - device: WebAuthnDevice = super().get_object() - if device.user != self.request.user: - raise Http404 - return device