mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-08-14 18:18:36 +02:00
Merge 0.2.5 bugfixes and Django 2.0 changes
This commit is contained in:
@ -22,11 +22,11 @@ from helpdesk.models import Ticket, Queue, UserSettings, KBCategory
|
||||
|
||||
@protect_view
|
||||
def homepage(request):
|
||||
if not request.user.is_authenticated() and helpdesk_settings.HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT:
|
||||
if not request.user.is_authenticated and helpdesk_settings.HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT:
|
||||
return HttpResponseRedirect(reverse('login'))
|
||||
|
||||
if is_helpdesk_staff(request.user) or \
|
||||
(request.user.is_authenticated() and
|
||||
(request.user.is_authenticated and
|
||||
helpdesk_settings.HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE):
|
||||
try:
|
||||
if request.user.usersettings_helpdesk.settings.get('login_view_ticketlist', False):
|
||||
@ -64,7 +64,7 @@ def homepage(request):
|
||||
if queue:
|
||||
initial_data['queue'] = queue.id
|
||||
|
||||
if request.user.is_authenticated() and request.user.email:
|
||||
if request.user.is_authenticated and request.user.email:
|
||||
initial_data['submitter_email'] = request.user.email
|
||||
|
||||
form = PublicTicketForm(initial=initial_data)
|
||||
|
Reference in New Issue
Block a user