forked from extern/django-helpdesk
* On the homepage, only redirect to the dashboard if the user is not staff (was redirecting if user was authenticated, although dashboard is for staff-only) (Issue #40)
* When editing a ticket, only show staff users in the 'Assign To' drop-down box (Issue #40)
This commit is contained in:
parent
fe7d42e257
commit
a95fc54586
@ -21,7 +21,7 @@ from helpdesk.models import Ticket, Queue
|
||||
|
||||
|
||||
def homepage(request):
|
||||
if request.user.is_authenticated():
|
||||
if request.user.is_staff:
|
||||
if getattr(request.user.usersettings.settings, 'login_view_ticketlist', False):
|
||||
return HttpResponseRedirect(reverse('helpdesk_list'))
|
||||
else:
|
||||
|
@ -121,7 +121,7 @@ def view_ticket(request, ticket_id):
|
||||
return render_to_response('helpdesk/ticket.html',
|
||||
RequestContext(request, {
|
||||
'ticket': ticket,
|
||||
'active_users': User.objects.filter(is_active=True, is_staff=True),
|
||||
'active_users': User.objects.filter(is_active=True).filter(is_staff=True),
|
||||
'priorities': Ticket.PRIORITY_CHOICES,
|
||||
'preset_replies': PreSetReply.objects.filter(Q(queues=ticket.queue) | Q(queues__isnull=True)),
|
||||
}))
|
||||
|
Loading…
Reference in New Issue
Block a user