admin: remove unnecessary success_urls

This commit is contained in:
Jens Langhammer 2021-02-09 20:58:46 +01:00
parent a7d0a50859
commit 2d4e7ebab5
8 changed files with 0 additions and 31 deletions

View File

@ -4,7 +4,6 @@ from django.contrib.auth.mixins import (
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
)
from django.contrib.messages.views import SuccessMessageMixin
from django.urls import reverse_lazy
from django.utils.translation import gettext as _
from django.views.generic import UpdateView
from guardian.mixins import PermissionRequiredMixin
@ -29,7 +28,6 @@ class ApplicationCreateView(
permission_required = "authentik_core.add_application"
template_name = "generic/create.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully created Application")
@ -47,7 +45,6 @@ class ApplicationUpdateView(
permission_required = "authentik_core.change_application"
template_name = "generic/update.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully updated Application")
@ -60,5 +57,4 @@ class ApplicationDeleteView(
permission_required = "authentik_core.delete_application"
template_name = "generic/delete.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully deleted Application")

View File

@ -4,7 +4,6 @@ from django.contrib.auth.mixins import (
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
)
from django.contrib.messages.views import SuccessMessageMixin
from django.urls import reverse_lazy
from django.utils.translation import gettext as _
from django.views.generic import UpdateView
from guardian.mixins import PermissionRequiredMixin
@ -29,7 +28,6 @@ class NotificationRuleCreateView(
permission_required = "authentik_events.add_NotificationRule"
template_name = "generic/create.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully created Notification Rule")
@ -47,7 +45,6 @@ class NotificationRuleUpdateView(
permission_required = "authentik_events.change_NotificationRule"
template_name = "generic/update.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully updated Notification Rule")
@ -60,5 +57,4 @@ class NotificationRuleDeleteView(
permission_required = "authentik_events.delete_NotificationRule"
template_name = "generic/delete.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully deleted Notification Rule")

View File

@ -4,7 +4,6 @@ from django.contrib.auth.mixins import (
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
)
from django.contrib.messages.views import SuccessMessageMixin
from django.urls import reverse_lazy
from django.utils.translation import gettext as _
from django.views.generic import UpdateView
from guardian.mixins import PermissionRequiredMixin
@ -29,7 +28,6 @@ class NotificationTransportCreateView(
permission_required = "authentik_events.add_notificationtransport"
template_name = "generic/create.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully created Notification Transport")
@ -47,7 +45,6 @@ class NotificationTransportUpdateView(
permission_required = "authentik_events.change_notificationtransport"
template_name = "generic/update.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully updated Notification Transport")
@ -60,5 +57,4 @@ class NotificationTransportDeleteView(
permission_required = "authentik_events.delete_notificationtransport"
template_name = "generic/delete.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully deleted Notification Transport")

View File

@ -7,7 +7,6 @@ from django.contrib.auth.mixins import (
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
)
from django.contrib.messages.views import SuccessMessageMixin
from django.urls import reverse_lazy
from django.utils.translation import gettext as _
from django.views.generic import UpdateView
from guardian.mixins import PermissionRequiredMixin
@ -32,7 +31,6 @@ class OutpostCreateView(
permission_required = "authentik_outposts.add_outpost"
template_name = "generic/create.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully created Outpost")
def get_initial(self) -> Dict[str, Any]:
@ -57,7 +55,6 @@ class OutpostUpdateView(
permission_required = "authentik_outposts.change_outpost"
template_name = "generic/update.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully updated Outpost")
@ -68,5 +65,4 @@ class OutpostDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessa
permission_required = "authentik_outposts.delete_outpost"
template_name = "generic/delete.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully deleted Outpost")

View File

@ -3,7 +3,6 @@ from django.contrib.messages.views import SuccessMessageMixin
from django.core.cache import cache
from django.http.request import HttpRequest
from django.http.response import HttpResponse
from django.urls.base import reverse_lazy
from django.utils.translation import gettext as _
from django.views.generic import FormView
from structlog.stdlib import get_logger
@ -21,7 +20,6 @@ class PolicyCacheClearView(AdminRequiredMixin, SuccessMessageMixin, FormView):
form_class = PolicyCacheClearForm
template_name = "generic/form_non_model.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully cleared Policy cache")
def post(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
@ -40,7 +38,6 @@ class FlowCacheClearView(AdminRequiredMixin, SuccessMessageMixin, FormView):
form_class = FlowCacheClearForm
template_name = "generic/form_non_model.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully cleared Flow cache")
def post(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:

View File

@ -8,7 +8,6 @@ from django.contrib.auth.mixins import (
)
from django.contrib.messages.views import SuccessMessageMixin
from django.http import HttpResponse
from django.urls import reverse_lazy
from django.utils.translation import gettext as _
from django.views.generic import FormView
from django.views.generic.detail import DetailView
@ -37,7 +36,6 @@ class PropertyMappingCreateView(
permission_required = "authentik_core.add_propertymapping"
template_name = "generic/create.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully created Property Mapping")
@ -54,7 +52,6 @@ class PropertyMappingUpdateView(
permission_required = "authentik_core.change_propertymapping"
template_name = "generic/update.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully updated Property Mapping")
@ -67,7 +64,6 @@ class PropertyMappingDeleteView(
permission_required = "authentik_core.delete_propertymapping"
template_name = "generic/delete.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully deleted Property Mapping")

View File

@ -4,7 +4,6 @@ from django.contrib.auth.mixins import (
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
)
from django.contrib.messages.views import SuccessMessageMixin
from django.urls import reverse_lazy
from django.utils.translation import gettext as _
from guardian.mixins import PermissionRequiredMixin
@ -30,7 +29,6 @@ class ProviderCreateView(
permission_required = "authentik_core.add_provider"
template_name = "generic/create.html"
success_url = reverse_lazy("authentik_admin:providers")
success_message = _("Successfully created Provider")
@ -47,7 +45,6 @@ class ProviderUpdateView(
permission_required = "authentik_core.change_provider"
template_name = "generic/update.html"
success_url = reverse_lazy("authentik_admin:providers")
success_message = _("Successfully updated Provider")
@ -60,5 +57,4 @@ class ProviderDeleteView(
permission_required = "authentik_core.delete_provider"
template_name = "generic/delete.html"
success_url = reverse_lazy("authentik_admin:providers")
success_message = _("Successfully deleted Provider")

View File

@ -4,7 +4,6 @@ from django.contrib.auth.mixins import (
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
)
from django.contrib.messages.views import SuccessMessageMixin
from django.urls import reverse_lazy
from django.utils.translation import gettext as _
from guardian.mixins import PermissionRequiredMixin
@ -30,7 +29,6 @@ class SourceCreateView(
permission_required = "authentik_core.add_source"
template_name = "generic/create.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully created Source")
@ -47,7 +45,6 @@ class SourceUpdateView(
permission_required = "authentik_core.change_source"
template_name = "generic/update.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully updated Source")
@ -58,5 +55,4 @@ class SourceDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessag
permission_required = "authentik_core.delete_source"
template_name = "generic/delete.html"
success_url = reverse_lazy("authentik_core:shell")
success_message = _("Successfully deleted Source")