admin: fix success_urls

This commit is contained in:
Jens Langhammer 2021-02-23 22:53:05 +01:00
parent 7da90ff7e4
commit c5a2bb8914
7 changed files with 21 additions and 12 deletions

View File

@ -27,6 +27,7 @@ class ApplicationCreateView(
form_class = ApplicationForm form_class = ApplicationForm
permission_required = "authentik_core.add_application" permission_required = "authentik_core.add_application"
success_url = "/"
template_name = "generic/create.html" template_name = "generic/create.html"
success_message = _("Successfully created Application") success_message = _("Successfully created Application")
@ -44,6 +45,7 @@ class ApplicationUpdateView(
form_class = ApplicationForm form_class = ApplicationForm
permission_required = "authentik_core.change_application" permission_required = "authentik_core.change_application"
success_url = "/"
template_name = "generic/update.html" template_name = "generic/update.html"
success_message = _("Successfully updated Application") success_message = _("Successfully updated Application")
@ -56,5 +58,6 @@ class ApplicationDeleteView(
model = Application model = Application
permission_required = "authentik_core.delete_application" permission_required = "authentik_core.delete_application"
success_url = "/"
template_name = "generic/delete.html" template_name = "generic/delete.html"
success_message = _("Successfully deleted Application") success_message = _("Successfully deleted Application")

View File

@ -27,6 +27,7 @@ class NotificationRuleCreateView(
form_class = NotificationRuleForm form_class = NotificationRuleForm
permission_required = "authentik_events.add_NotificationRule" permission_required = "authentik_events.add_NotificationRule"
success_url = "/"
template_name = "generic/create.html" template_name = "generic/create.html"
success_message = _("Successfully created Notification Rule") success_message = _("Successfully created Notification Rule")
@ -44,6 +45,7 @@ class NotificationRuleUpdateView(
form_class = NotificationRuleForm form_class = NotificationRuleForm
permission_required = "authentik_events.change_NotificationRule" permission_required = "authentik_events.change_NotificationRule"
success_url = "/"
template_name = "generic/update.html" template_name = "generic/update.html"
success_message = _("Successfully updated Notification Rule") success_message = _("Successfully updated Notification Rule")
@ -56,5 +58,6 @@ class NotificationRuleDeleteView(
model = NotificationRule model = NotificationRule
permission_required = "authentik_events.delete_NotificationRule" permission_required = "authentik_events.delete_NotificationRule"
success_url = "/"
template_name = "generic/delete.html" template_name = "generic/delete.html"
success_message = _("Successfully deleted Notification Rule") success_message = _("Successfully deleted Notification Rule")

View File

@ -26,7 +26,7 @@ class NotificationTransportCreateView(
model = NotificationTransport model = NotificationTransport
form_class = NotificationTransportForm form_class = NotificationTransportForm
permission_required = "authentik_events.add_notificationtransport" permission_required = "authentik_events.add_notificationtransport"
success_url = "/"
template_name = "generic/create.html" template_name = "generic/create.html"
success_message = _("Successfully created Notification Transport") success_message = _("Successfully created Notification Transport")
@ -43,7 +43,7 @@ class NotificationTransportUpdateView(
model = NotificationTransport model = NotificationTransport
form_class = NotificationTransportForm form_class = NotificationTransportForm
permission_required = "authentik_events.change_notificationtransport" permission_required = "authentik_events.change_notificationtransport"
success_url = "/"
template_name = "generic/update.html" template_name = "generic/update.html"
success_message = _("Successfully updated Notification Transport") success_message = _("Successfully updated Notification Transport")
@ -55,6 +55,6 @@ class NotificationTransportDeleteView(
model = NotificationTransport model = NotificationTransport
permission_required = "authentik_events.delete_notificationtransport" permission_required = "authentik_events.delete_notificationtransport"
success_url = "/"
template_name = "generic/delete.html" template_name = "generic/delete.html"
success_message = _("Successfully deleted Notification Transport") success_message = _("Successfully deleted Notification Transport")

View File

@ -29,7 +29,7 @@ class OutpostCreateView(
model = Outpost model = Outpost
form_class = OutpostForm form_class = OutpostForm
permission_required = "authentik_outposts.add_outpost" permission_required = "authentik_outposts.add_outpost"
success_url = "/"
template_name = "generic/create.html" template_name = "generic/create.html"
success_message = _("Successfully created Outpost") success_message = _("Successfully created Outpost")
@ -53,7 +53,7 @@ class OutpostUpdateView(
model = Outpost model = Outpost
form_class = OutpostForm form_class = OutpostForm
permission_required = "authentik_outposts.change_outpost" permission_required = "authentik_outposts.change_outpost"
success_url = "/"
template_name = "generic/update.html" template_name = "generic/update.html"
success_message = _("Successfully updated Outpost") success_message = _("Successfully updated Outpost")
@ -63,6 +63,6 @@ class OutpostDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessa
model = Outpost model = Outpost
permission_required = "authentik_outposts.delete_outpost" permission_required = "authentik_outposts.delete_outpost"
success_url = "/"
template_name = "generic/delete.html" template_name = "generic/delete.html"
success_message = _("Successfully deleted Outpost") success_message = _("Successfully deleted Outpost")

View File

@ -34,7 +34,7 @@ class PropertyMappingCreateView(
model = PropertyMapping model = PropertyMapping
permission_required = "authentik_core.add_propertymapping" permission_required = "authentik_core.add_propertymapping"
success_url = "/"
template_name = "generic/create.html" template_name = "generic/create.html"
success_message = _("Successfully created Property Mapping") success_message = _("Successfully created Property Mapping")
@ -50,7 +50,7 @@ class PropertyMappingUpdateView(
model = PropertyMapping model = PropertyMapping
permission_required = "authentik_core.change_propertymapping" permission_required = "authentik_core.change_propertymapping"
success_url = "/"
template_name = "generic/update.html" template_name = "generic/update.html"
success_message = _("Successfully updated Property Mapping") success_message = _("Successfully updated Property Mapping")
@ -62,7 +62,7 @@ class PropertyMappingDeleteView(
model = PropertyMapping model = PropertyMapping
permission_required = "authentik_core.delete_propertymapping" permission_required = "authentik_core.delete_propertymapping"
success_url = "/"
template_name = "generic/delete.html" template_name = "generic/delete.html"
success_message = _("Successfully deleted Property Mapping") success_message = _("Successfully deleted Property Mapping")

View File

@ -27,7 +27,7 @@ class ProviderCreateView(
model = Provider model = Provider
permission_required = "authentik_core.add_provider" permission_required = "authentik_core.add_provider"
success_url = "/"
template_name = "generic/create.html" template_name = "generic/create.html"
success_message = _("Successfully created Provider") success_message = _("Successfully created Provider")
@ -43,7 +43,7 @@ class ProviderUpdateView(
model = Provider model = Provider
permission_required = "authentik_core.change_provider" permission_required = "authentik_core.change_provider"
success_url = "/"
template_name = "generic/update.html" template_name = "generic/update.html"
success_message = _("Successfully updated Provider") success_message = _("Successfully updated Provider")
@ -55,6 +55,6 @@ class ProviderDeleteView(
model = Provider model = Provider
permission_required = "authentik_core.delete_provider" permission_required = "authentik_core.delete_provider"
success_url = "/"
template_name = "generic/delete.html" template_name = "generic/delete.html"
success_message = _("Successfully deleted Provider") success_message = _("Successfully deleted Provider")

View File

@ -28,6 +28,7 @@ class SourceCreateView(
model = Source model = Source
permission_required = "authentik_core.add_source" permission_required = "authentik_core.add_source"
success_url = "/"
template_name = "generic/create.html" template_name = "generic/create.html"
success_message = _("Successfully created Source") success_message = _("Successfully created Source")
@ -44,6 +45,7 @@ class SourceUpdateView(
model = Source model = Source
permission_required = "authentik_core.change_source" permission_required = "authentik_core.change_source"
success_url = "/"
template_name = "generic/update.html" template_name = "generic/update.html"
success_message = _("Successfully updated Source") success_message = _("Successfully updated Source")
@ -54,5 +56,6 @@ class SourceDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessag
model = Source model = Source
permission_required = "authentik_core.delete_source" permission_required = "authentik_core.delete_source"
success_url = "/"
template_name = "generic/delete.html" template_name = "generic/delete.html"
success_message = _("Successfully deleted Source") success_message = _("Successfully deleted Source")