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):