From 5d190c30ab05d1880c4ec8a3a80bdf86fdbae7bc Mon Sep 17 00:00:00 2001 From: Timothy Hobbs Date: Thu, 23 Nov 2023 22:51:42 +0100 Subject: [PATCH] re-protect public views --- helpdesk/urls.py | 8 ++++---- helpdesk/views/public.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/helpdesk/urls.py b/helpdesk/urls.py index 96af9f23..09a6ab7b 100644 --- a/helpdesk/urls.py +++ b/helpdesk/urls.py @@ -154,19 +154,19 @@ if helpdesk_settings.HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET: urlpatterns += [ path("", protect_view(public.Homepage.as_view()), name="home"), - path("tickets/my-tickets/", public.MyTickets.as_view(), name="my-tickets"), + path("tickets/my-tickets/", protect_view(public.MyTickets.as_view()), name="my-tickets"), path("tickets/submit/", public.create_ticket, name="submit"), path( "tickets/submit_iframe/", - public.CreateTicketIframeView.as_view(), + protect_view(public.CreateTicketIframeView.as_view()), name="submit_iframe", ), path( "tickets/success_iframe/", # Ticket was submitted successfully - public.SuccessIframeView.as_view(), + protect_view(public.SuccessIframeView.as_view()), name="success_iframe", ), - path("view/", public.ViewTicket.as_view(), name="public_view"), + path("view/", protect_view(public.ViewTicket.as_view()), name="public_view"), path("change_language/", public.change_language, name="public_change_language"), ] diff --git a/helpdesk/views/public.py b/helpdesk/views/public.py index a323a093..2ee626cb 100644 --- a/helpdesk/views/public.py +++ b/helpdesk/views/public.py @@ -37,7 +37,7 @@ def create_ticket(request, *args, **kwargs): if is_helpdesk_staff(request.user): return staff.CreateTicketView.as_view()(request, *args, **kwargs) else: - return CreateTicketView.as_view()(request, *args, **kwargs) + return protect_view(CreateTicketView.as_view())(request, *args, **kwargs) class BaseCreateTicketView(abstract_views.AbstractCreateTicketMixin, FormView):