mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2025-01-14 09:58:37 +01:00
When a logged-in user hits the public ticket view, redirect them to the staff view.
This commit is contained in:
parent
f3bd5da906
commit
c9e68a05a7
@ -84,6 +84,12 @@ def view_ticket(request):
|
||||
|
||||
if ticket:
|
||||
|
||||
if request.user.is_staff:
|
||||
redirect_url = reverse('helpdesk_view', args=[ticket_id])
|
||||
if request.GET.has_key('close'):
|
||||
redirect_url += '?close'
|
||||
return HttpResponseRedirect(redirect_url)
|
||||
|
||||
if request.GET.has_key('close') and ticket.status == Ticket.RESOLVED_STATUS:
|
||||
from helpdesk.views.staff import update_ticket
|
||||
# Trick the update_ticket() view into thinking it's being called with
|
||||
|
Loading…
Reference in New Issue
Block a user