re-protect public views

This commit is contained in:
Timothy Hobbs 2023-11-23 22:51:42 +01:00
parent 162a368b9d
commit 5d190c30ab
2 changed files with 5 additions and 5 deletions

View File

@ -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"),
]

View File

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