rossp/django-helpdesk — Issue #78: change staff.update_ticket so that user is forwarded to login page instead of seeing an error message only
Author: kotowicz
Created: 2011-11-08 09:40:04+00:00
State: open

Very often I start working on a ticket and have the ticket page open. I then switch to a different tasks and finally come back to django-helpdesk and want to update the ticket that I still have in front of me. So I fill out the new information but since my django session has expired, I only get to see the 'Sorry, you need to login to do that.' message. I think it would make more sense to redirect the user to the site's login page (if present) and then send him / her back to the ticket that he / she was working on.

These are the corresponding lines of code in staff.update_ticket:

```
if not (public or (request.user.is_authenticated() and request.user.is_active and request.user.is_staff)):
return HttpResponseForbidden(_('Sorry, you need to login to do that.'))
```