When a logged-in user hits the public ticket view, redirect them to the staff view.

This commit is contained in:
Ross Poulton 2011-05-02 22:31:30 +00:00
parent f3bd5da906
commit c9e68a05a7

View File

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