mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-05-19 17:00:44 +02: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
@ -83,6 +83,12 @@ def view_ticket(request):
|
|||||||
error_message = _('Invalid ticket ID or e-mail address. Please try again.')
|
error_message = _('Invalid ticket ID or e-mail address. Please try again.')
|
||||||
|
|
||||||
if ticket:
|
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:
|
if request.GET.has_key('close') and ticket.status == Ticket.RESOLVED_STATUS:
|
||||||
from helpdesk.views.staff import update_ticket
|
from helpdesk.views.staff import update_ticket
|
||||||
|
Loading…
Reference in New Issue
Block a user