From 78a4a167ac246d1be37c8a623d3e42997a378fb3 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 30 Mar 2021 18:35:40 +0200 Subject: [PATCH] outposts: remove outpost form Signed-off-by: Jens Langhammer --- authentik/core/tests/test_api.py | 3 ++- authentik/outposts/forms.py | 34 -------------------------------- 2 files changed, 2 insertions(+), 35 deletions(-) diff --git a/authentik/core/tests/test_api.py b/authentik/core/tests/test_api.py index f9454103c..4912e17ed 100644 --- a/authentik/core/tests/test_api.py +++ b/authentik/core/tests/test_api.py @@ -29,5 +29,6 @@ class TestPropertyMappingAPI(APITestCase): }, ) self.assertJSONEqual( - response.content.decode(), {"result": dumps({"foo": "bar"}), "successful": True} + response.content.decode(), + {"result": dumps({"foo": "bar"}), "successful": True}, ) diff --git a/authentik/outposts/forms.py b/authentik/outposts/forms.py index ed4355574..f8805eb75 100644 --- a/authentik/outposts/forms.py +++ b/authentik/outposts/forms.py @@ -1,5 +1,4 @@ """Outpost forms""" - from django import forms from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ @@ -12,40 +11,7 @@ from authentik.crypto.models import CertificateKeyPair from authentik.outposts.models import ( DockerServiceConnection, KubernetesServiceConnection, - Outpost, - OutpostServiceConnection, ) -from authentik.providers.proxy.models import ProxyProvider - - -class OutpostForm(forms.ModelForm): - """Outpost Form""" - - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - self.fields["providers"].queryset = ProxyProvider.objects.all() - self.fields[ - "service_connection" - ].queryset = OutpostServiceConnection.objects.select_subclasses() - - class Meta: - - model = Outpost - fields = [ - "name", - "type", - "service_connection", - "providers", - "_config", - ] - widgets = { - "name": forms.TextInput(), - "_config": CodeMirrorWidget, - } - field_classes = { - "_config": YAMLField, - } - labels = {"_config": _("Configuration")} class DockerServiceConnectionForm(forms.ModelForm):