mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-21 23:43:11 +01:00
re-protect public views
This commit is contained in:
parent
162a368b9d
commit
5d190c30ab
@ -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"),
|
||||
]
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user