mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-01-31 18:39:16 +01:00
Merge pull request #764 from lasircc/develop
Add setting for HTTPS in email links
This commit is contained in:
commit
cda16297bf
@ -666,7 +666,12 @@ class Ticket(models.Model):
|
|||||||
site = Site.objects.get_current()
|
site = Site.objects.get_current()
|
||||||
except ImproperlyConfigured:
|
except ImproperlyConfigured:
|
||||||
site = Site(domain='configure-django-sites.com')
|
site = Site(domain='configure-django-sites.com')
|
||||||
return u"http://%s%s?ticket=%s&email=%s&key=%s" % (
|
if settings.HELPDESK_USE_HTTPS_IN_EMAIL_LINK:
|
||||||
|
protocol = 'https'
|
||||||
|
else:
|
||||||
|
protocol = 'http'
|
||||||
|
return u"%s://%s%s?ticket=%s&email=%s&key=%s" % (
|
||||||
|
protocol,
|
||||||
site.domain,
|
site.domain,
|
||||||
reverse('helpdesk:public_view'),
|
reverse('helpdesk:public_view'),
|
||||||
self.ticket_for_url,
|
self.ticket_for_url,
|
||||||
@ -687,7 +692,12 @@ class Ticket(models.Model):
|
|||||||
site = Site.objects.get_current()
|
site = Site.objects.get_current()
|
||||||
except ImproperlyConfigured:
|
except ImproperlyConfigured:
|
||||||
site = Site(domain='configure-django-sites.com')
|
site = Site(domain='configure-django-sites.com')
|
||||||
return u"http://%s%s" % (
|
if settings.HELPDESK_USE_HTTPS_IN_EMAIL_LINK:
|
||||||
|
protocol = 'https'
|
||||||
|
else:
|
||||||
|
protocol = 'http'
|
||||||
|
return u"%s://%s%s" % (
|
||||||
|
protocol,
|
||||||
site.domain,
|
site.domain,
|
||||||
reverse('helpdesk:view',
|
reverse('helpdesk:view',
|
||||||
args=[self.id])
|
args=[self.id])
|
||||||
|
@ -149,6 +149,8 @@ QUEUE_EMAIL_BOX_UPDATE_ONLY = getattr(settings, 'QUEUE_EMAIL_BOX_UPDATE_ONLY', F
|
|||||||
HELPDESK_ENABLE_PER_QUEUE_STAFF_PERMISSION = getattr(
|
HELPDESK_ENABLE_PER_QUEUE_STAFF_PERMISSION = getattr(
|
||||||
settings, 'HELPDESK_ENABLE_PER_QUEUE_STAFF_PERMISSION', False)
|
settings, 'HELPDESK_ENABLE_PER_QUEUE_STAFF_PERMISSION', False)
|
||||||
|
|
||||||
|
# use https in the email links
|
||||||
|
HELPDESK_USE_HTTPS_IN_EMAIL_LINK = getattr(settings, 'HELPDESK_USE_HTTPS_IN_EMAIL_LINK', False)
|
||||||
|
|
||||||
# Asynchronous Datatables - Optional
|
# Asynchronous Datatables - Optional
|
||||||
HELPDESK_USE_SERVERSIDE_PROCESSING = getattr(
|
HELPDESK_USE_SERVERSIDE_PROCESSING = getattr(
|
||||||
|
Loading…
Reference in New Issue
Block a user