2009-09-09 11:11:05 +02:00
|
|
|
"""
|
2011-01-26 00:08:41 +01:00
|
|
|
Default settings for django-helpdesk.
|
2009-09-09 11:11:05 +02:00
|
|
|
|
|
|
|
"""
|
2014-07-20 10:36:24 +02:00
|
|
|
import warnings
|
2009-09-09 11:11:05 +02:00
|
|
|
from django.conf import settings
|
2014-07-30 06:35:52 +02:00
|
|
|
from django.core.exceptions import ImproperlyConfigured
|
2009-09-09 11:11:05 +02:00
|
|
|
|
2011-02-02 09:15:49 +01:00
|
|
|
|
|
|
|
try:
|
|
|
|
DEFAULT_USER_SETTINGS = settings.HELPDESK_DEFAULT_SETTINGS
|
|
|
|
except:
|
|
|
|
DEFAULT_USER_SETTINGS = None
|
|
|
|
|
2016-10-21 17:14:12 +02:00
|
|
|
if not isinstance(DEFAULT_USER_SETTINGS, dict):
|
2011-02-02 09:15:49 +01:00
|
|
|
DEFAULT_USER_SETTINGS = {
|
2016-10-21 17:14:12 +02:00
|
|
|
'use_email_as_submitter': True,
|
|
|
|
'email_on_ticket_assign': True,
|
|
|
|
'email_on_ticket_change': True,
|
|
|
|
'login_view_ticketlist': True,
|
|
|
|
'tickets_per_page': 25
|
|
|
|
}
|
2011-06-09 17:24:33 +02:00
|
|
|
|
2011-11-28 15:17:54 +01:00
|
|
|
|
2014-03-04 21:20:47 +01:00
|
|
|
HAS_TAG_SUPPORT = False
|
2011-11-28 15:17:54 +01:00
|
|
|
|
2016-10-21 17:14:12 +02:00
|
|
|
##########################################
|
|
|
|
# generic options - visible on all pages #
|
|
|
|
##########################################
|
|
|
|
|
2011-11-19 09:34:07 +01:00
|
|
|
# redirect to login page instead of the default homepage when users visits "/"?
|
2016-10-21 17:14:12 +02:00
|
|
|
HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT = getattr(settings,
|
|
|
|
'HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT',
|
|
|
|
False)
|
2011-11-19 09:34:07 +01:00
|
|
|
|
2017-10-04 03:42:26 +02:00
|
|
|
# raises a 404 to anon users. It's like it was invisible
|
|
|
|
HELPDESK_ANON_ACCESS_RAISES_404 = getattr(settings,
|
|
|
|
'HELPDESK_ANON_ACCESS_RAISES_404',
|
|
|
|
False)
|
|
|
|
|
2011-06-09 17:24:33 +02:00
|
|
|
# show knowledgebase links?
|
|
|
|
HELPDESK_KB_ENABLED = getattr(settings, 'HELPDESK_KB_ENABLED', True)
|
2011-11-19 09:34:07 +01:00
|
|
|
|
|
|
|
# show extended navigation by default, to all users, irrespective of staff status?
|
|
|
|
HELPDESK_NAVIGATION_ENABLED = getattr(settings, 'HELPDESK_NAVIGATION_ENABLED', False)
|
|
|
|
|
2016-10-21 17:14:12 +02:00
|
|
|
# use public CDNs to serve jquery and other javascript by default?
|
|
|
|
# otherwise, use built-in static copy
|
2016-08-05 06:38:17 +02:00
|
|
|
HELPDESK_USE_CDN = getattr(settings, 'HELPDESK_USE_CDN', False)
|
|
|
|
|
2011-11-21 17:39:13 +01:00
|
|
|
# show dropdown list of languages that ticket comments can be translated into?
|
2016-10-21 17:14:12 +02:00
|
|
|
HELPDESK_TRANSLATE_TICKET_COMMENTS = getattr(settings,
|
|
|
|
'HELPDESK_TRANSLATE_TICKET_COMMENTS',
|
|
|
|
False)
|
2011-11-21 17:39:13 +01:00
|
|
|
|
2016-10-21 17:14:12 +02:00
|
|
|
# list of languages to offer. if set to false,
|
|
|
|
# all default google translate languages will be shown.
|
|
|
|
HELPDESK_TRANSLATE_TICKET_COMMENTS_LANG = getattr(settings,
|
|
|
|
'HELPDESK_TRANSLATE_TICKET_COMMENTS_LANG',
|
2017-07-17 09:56:22 +02:00
|
|
|
["en", "de", "es", "fr", "it", "ru"])
|
2011-11-21 17:39:13 +01:00
|
|
|
|
2011-11-24 13:30:45 +01:00
|
|
|
# show link to 'change password' on 'User Settings' page?
|
|
|
|
HELPDESK_SHOW_CHANGE_PASSWORD = getattr(settings, 'HELPDESK_SHOW_CHANGE_PASSWORD', False)
|
|
|
|
|
2011-11-21 20:04:05 +01:00
|
|
|
# allow user to override default layout for 'followups' - work in progress.
|
|
|
|
HELPDESK_FOLLOWUP_MOD = getattr(settings, 'HELPDESK_FOLLOWUP_MOD', False)
|
|
|
|
|
2012-08-07 15:41:43 +02:00
|
|
|
# auto-subscribe user to ticket if (s)he responds to a ticket?
|
2016-10-21 17:14:12 +02:00
|
|
|
HELPDESK_AUTO_SUBSCRIBE_ON_TICKET_RESPONSE = getattr(settings,
|
|
|
|
'HELPDESK_AUTO_SUBSCRIBE_ON_TICKET_RESPONSE',
|
|
|
|
False)
|
|
|
|
|
2011-11-21 20:04:05 +01:00
|
|
|
|
2016-10-21 17:14:12 +02:00
|
|
|
############################
|
|
|
|
# options for public pages #
|
|
|
|
############################
|
2011-11-19 09:34:07 +01:00
|
|
|
|
|
|
|
# show 'view a ticket' section on public page?
|
|
|
|
HELPDESK_VIEW_A_TICKET_PUBLIC = getattr(settings, 'HELPDESK_VIEW_A_TICKET_PUBLIC', True)
|
|
|
|
|
|
|
|
# show 'submit a ticket' section on public page?
|
|
|
|
HELPDESK_SUBMIT_A_TICKET_PUBLIC = getattr(settings, 'HELPDESK_SUBMIT_A_TICKET_PUBLIC', True)
|
|
|
|
|
|
|
|
|
2016-10-21 17:14:12 +02:00
|
|
|
###################################
|
|
|
|
# options for update_ticket views #
|
|
|
|
###################################
|
2011-11-28 15:17:54 +01:00
|
|
|
|
2011-11-19 09:34:07 +01:00
|
|
|
''' options for update_ticket views '''
|
2016-10-21 17:14:12 +02:00
|
|
|
# allow non-staff users to interact with tickets?
|
2014-08-01 07:20:43 +02:00
|
|
|
# can be True/False or a callable accepting the active user and returning True if they must be considered helpdesk staff
|
2011-11-19 09:34:07 +01:00
|
|
|
HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE = getattr(settings, 'HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE', False)
|
2014-08-01 07:20:43 +02:00
|
|
|
if not (HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE in (True, False) or callable(HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE)):
|
|
|
|
warnings.warn("HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE should be set to either True/False or a callable.", RuntimeWarning)
|
2011-11-19 09:34:07 +01:00
|
|
|
|
|
|
|
# show edit buttons in ticket follow ups.
|
2016-10-21 17:14:12 +02:00
|
|
|
HELPDESK_SHOW_EDIT_BUTTON_FOLLOW_UP = getattr(settings,
|
|
|
|
'HELPDESK_SHOW_EDIT_BUTTON_FOLLOW_UP',
|
|
|
|
True)
|
2011-11-19 09:34:07 +01:00
|
|
|
|
2012-08-07 15:32:45 +02:00
|
|
|
# show delete buttons in ticket follow ups if user is 'superuser'
|
2016-10-21 17:14:12 +02:00
|
|
|
HELPDESK_SHOW_DELETE_BUTTON_SUPERUSER_FOLLOW_UP = getattr(
|
|
|
|
settings, 'HELPDESK_SHOW_DELETE_BUTTON_SUPERUSER_FOLLOW_UP', False)
|
2012-08-07 15:32:45 +02:00
|
|
|
|
2011-11-19 09:34:07 +01:00
|
|
|
# make all updates public by default? this will hide the 'is this update public' checkbox
|
2014-01-29 12:19:35 +01:00
|
|
|
HELPDESK_UPDATE_PUBLIC_DEFAULT = getattr(settings, 'HELPDESK_UPDATE_PUBLIC_DEFAULT', False)
|
2011-11-19 09:34:07 +01:00
|
|
|
|
2015-06-11 12:18:45 +02:00
|
|
|
# only show staff users in ticket owner drop-downs
|
2012-01-17 22:40:44 +01:00
|
|
|
HELPDESK_STAFF_ONLY_TICKET_OWNERS = getattr(settings, 'HELPDESK_STAFF_ONLY_TICKET_OWNERS', False)
|
|
|
|
|
2015-06-11 12:18:45 +02:00
|
|
|
# only show staff users in ticket cc drop-down
|
2012-01-17 22:40:44 +01:00
|
|
|
HELPDESK_STAFF_ONLY_TICKET_CC = getattr(settings, 'HELPDESK_STAFF_ONLY_TICKET_CC', False)
|
|
|
|
|
2014-07-16 00:48:42 +02:00
|
|
|
# allow the subject to have a configurable template.
|
2016-10-21 17:14:12 +02:00
|
|
|
HELPDESK_EMAIL_SUBJECT_TEMPLATE = getattr(
|
|
|
|
settings, 'HELPDESK_EMAIL_SUBJECT_TEMPLATE',
|
|
|
|
"{{ ticket.ticket }} {{ ticket.title|safe }} %(subject)s")
|
2014-07-16 00:48:42 +02:00
|
|
|
|
2016-10-14 10:04:28 +02:00
|
|
|
# default fallback locale when queue locale not found
|
|
|
|
HELPDESK_EMAIL_FALLBACK_LOCALE = getattr(settings, 'HELPDESK_EMAIL_FALLBACK_LOCALE', 'en')
|
|
|
|
|
2011-11-28 15:17:54 +01:00
|
|
|
|
2016-10-21 17:14:12 +02:00
|
|
|
########################################
|
|
|
|
# options for staff.create_ticket view #
|
|
|
|
########################################
|
|
|
|
|
2011-11-28 15:17:54 +01:00
|
|
|
# hide the 'assigned to' / 'Case owner' field from the 'create_ticket' view?
|
2016-10-21 17:14:12 +02:00
|
|
|
HELPDESK_CREATE_TICKET_HIDE_ASSIGNED_TO = getattr(
|
|
|
|
settings, 'HELPDESK_CREATE_TICKET_HIDE_ASSIGNED_TO', False)
|
2011-11-28 15:17:54 +01:00
|
|
|
|
|
|
|
|
2016-10-21 17:14:12 +02:00
|
|
|
#################
|
|
|
|
# email options #
|
|
|
|
#################
|
2011-11-28 15:17:54 +01:00
|
|
|
|
2012-01-17 02:01:47 +01:00
|
|
|
# default Queue email submission settings
|
|
|
|
QUEUE_EMAIL_BOX_TYPE = getattr(settings, 'QUEUE_EMAIL_BOX_TYPE', None)
|
2012-01-17 02:36:24 +01:00
|
|
|
QUEUE_EMAIL_BOX_SSL = getattr(settings, 'QUEUE_EMAIL_BOX_SSL', None)
|
2012-01-17 02:01:47 +01:00
|
|
|
QUEUE_EMAIL_BOX_HOST = getattr(settings, 'QUEUE_EMAIL_BOX_HOST', None)
|
|
|
|
QUEUE_EMAIL_BOX_USER = getattr(settings, 'QUEUE_EMAIL_BOX_USER', None)
|
|
|
|
QUEUE_EMAIL_BOX_PASSWORD = getattr(settings, 'QUEUE_EMAIL_BOX_PASSWORD', None)
|
2017-07-17 01:30:59 +02:00
|
|
|
|
|
|
|
# only process emails with a valid tracking ID? (throws away all other mail)
|
2017-07-11 18:59:56 +02:00
|
|
|
QUEUE_EMAIL_BOX_UPDATE_ONLY = getattr(settings, 'QUEUE_EMAIL_BOX_UPDATE_ONLY', False)
|
2015-06-11 12:18:45 +02:00
|
|
|
|
|
|
|
# only allow users to access queues that they are members of?
|
2016-10-21 17:14:12 +02:00
|
|
|
HELPDESK_ENABLE_PER_QUEUE_STAFF_PERMISSION = getattr(
|
|
|
|
settings, 'HELPDESK_ENABLE_PER_QUEUE_STAFF_PERMISSION', False)
|