mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-06-19 17:18:23 +02:00
When unauthenticated users reach update view, forward to login. Addresses issue #78.
This commit is contained in:
parent
62093971ab
commit
e209793aa2
@ -243,7 +243,7 @@ view_ticket = staff_member_required(view_ticket)
|
|||||||
|
|
||||||
def update_ticket(request, ticket_id, public=False):
|
def update_ticket(request, ticket_id, public=False):
|
||||||
if not (public or (request.user.is_authenticated() and request.user.is_active and (request.user.is_staff or helpdesk_settings.HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE))):
|
if not (public or (request.user.is_authenticated() and request.user.is_active and (request.user.is_staff or helpdesk_settings.HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE))):
|
||||||
return HttpResponseForbidden(_('Sorry, you need to login to do that.'))
|
return HttpResponseRedirect('%s?next=%s' % (reverse('login'), request.path))
|
||||||
|
|
||||||
ticket = get_object_or_404(Ticket, id=ticket_id)
|
ticket = get_object_or_404(Ticket, id=ticket_id)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user