From 162a368b9d6259377d39c63a56bc76c1653dc42c Mon Sep 17 00:00:00 2001 From: Timothy Hobbs Date: Thu, 23 Nov 2023 22:23:13 +0100 Subject: [PATCH] Remove all mention of obsolute API deactivation switch. The helpdesk frontend now requires the API --- demo/demodesk/config/settings.py | 3 --- docs/api.rst | 4 ---- docs/settings.rst | 5 ----- helpdesk/settings.py | 4 ---- quicktest.py | 2 -- standalone/config/settings.py | 3 --- 6 files changed, 21 deletions(-) diff --git a/demo/demodesk/config/settings.py b/demo/demodesk/config/settings.py index 5851bb47..64ad1738 100644 --- a/demo/demodesk/config/settings.py +++ b/demo/demodesk/config/settings.py @@ -119,9 +119,6 @@ HELPDESK_TICKETS_TIMELINE_ENABLED = True # Allow users to change their passwords HELPDESK_SHOW_CHANGE_PASSWORD = True -# Activate the API -HELPDESK_ACTIVATE_API_ENDPOINT = True - # Instead of showing the public web portal first, # we can instead redirect users straight to the login page. HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT = False diff --git a/docs/api.rst b/docs/api.rst index 77e4b587..97b7ee5f 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -4,10 +4,6 @@ API A REST API (built with ``djangorestframework``) is available in order to list, create, update and delete tickets from other tools thanks to HTTP requests. -If you wish to use it, you have to add this line in your settings:: - - HELPDESK_ACTIVATE_API_ENDPOINT = True - You must be authenticated to access the API, the URL endpoint is ``/api/tickets/``. You can configure how you wish to authenticate to the API by customizing the ``DEFAULT_AUTHENTICATION_CLASSES`` key in the ``REST_FRAMEWORK`` setting (more information on this page : https://www.django-rest-framework.org/api-guide/authentication/) diff --git a/docs/settings.rst b/docs/settings.rst index 874afa34..3d2c5032 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -183,11 +183,6 @@ Staff Ticket Creation Settings **Default:** ``HELPDESK_CREATE_TICKET_HIDE_ASSIGNED_TO = False`` -- **HELPDESK_ACTIVATE_API_ENDPOINT** Activate the API endpoint to manage tickets thanks to Django REST Framework. See the API section in documentation for more information. - - **Default:** ``HELPDESK_ACTIVATE_API_ENDPOINT = False`` - - Staff Ticket View Settings ------------------------------ diff --git a/helpdesk/settings.py b/helpdesk/settings.py index 8212ffa9..1fc8a134 100644 --- a/helpdesk/settings.py +++ b/helpdesk/settings.py @@ -200,10 +200,6 @@ HELPDESK_MAX_EMAIL_ATTACHMENT_SIZE = getattr( HELPDESK_CREATE_TICKET_HIDE_ASSIGNED_TO = getattr( settings, 'HELPDESK_CREATE_TICKET_HIDE_ASSIGNED_TO', False) -# Activate the API endpoint to manage tickets thanks to Django REST Framework -HELPDESK_ACTIVATE_API_ENDPOINT = getattr( - settings, 'HELPDESK_ACTIVATE_API_ENDPOINT', False) - ################# # email options # diff --git a/quicktest.py b/quicktest.py index a710a41f..901ac63a 100755 --- a/quicktest.py +++ b/quicktest.py @@ -108,8 +108,6 @@ class QuickDjangoTest: HELPDESK_TEAMS_MODEL='auth.User', HELPDESK_TEAMS_MIGRATION_DEPENDENCIES=[], HELPDESK_KBITEM_TEAM_GETTER=lambda _: None, - # test the API - HELPDESK_ACTIVATE_API_ENDPOINT=True, # Set IMAP Server Debug Verbosity HELPDESK_IMAP_DEBUG_LEVEL=int(os.environ.get("HELPDESK_IMAP_DEBUG_LEVEL", "0")), ) diff --git a/standalone/config/settings.py b/standalone/config/settings.py index 237be0c5..643caebf 100644 --- a/standalone/config/settings.py +++ b/standalone/config/settings.py @@ -116,9 +116,6 @@ HELPDESK_TICKETS_TIMELINE_ENABLED = os.environ.get('HELPDESK_TICKETS_TIMELINE_EN # Allow users to change their passwords HELPDESK_SHOW_CHANGE_PASSWORD = os.environ.get('HELPDESK_SHOW_CHANGE_PASSWORD', 'True') == 'True' -# Activate the API -HELPDESK_ACTIVATE_API_ENDPOINT = os.environ.get('HELPDESK_ACTIVATE_API_ENDPOINT', 'True') == 'True' - # Instead of showing the public web portal first, # we can instead redirect users straight to the login page. HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT = os.environ.get('HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT', 'False') == 'True'