From 50b5069399f028d43612b5d156dd2c76bb3eb810 Mon Sep 17 00:00:00 2001 From: Timothy Hobbs Date: Mon, 26 Feb 2024 20:31:37 +0100 Subject: [PATCH] Add documentation for new redirect gates for views --- docs/settings.rst | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/docs/settings.rst b/docs/settings.rst index 94d71bcf..4db13dcd 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -37,14 +37,32 @@ If you want to override the default settings for your users, create ``HELPDESK_D 'tickets_per_page': 25 } -Generic Options +Access controll & Security --------------- -These changes are visible throughout django-helpdesk +These settings can be used to change who can access the helpdesk. + +- **HELPDESK_PUBLIC_VIEW_PROTECTOR** This is a function that takes a request and can either return `None` granting access to to a public view or a redirect denying access. + +- **HELPDESK_STAFF_VIEW_PROTECTOR** This is a function that takes a request and can either return `None` granting access to to a staff view or a redirect denying access. - **HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT** When a user visits "/", should we redirect to the login page instead of the default homepage? **Default:** ``HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT = False`` +- **HELPDESK_VALID_EXTENSIONS** Valid extensions for file types that can be attached to tickets + + **Default:** ``HELPDESK_VALID_EXTENSIONS = ['.txt', '.asc', '.htm', '.html', '.pdf', '.doc', '.docx', '.odt', '.jpg', '.png', '.eml'] + +- **HELPDESK_VALIDATE_ATTACHMENT_TYPES** If you'd like to turn of filtering of helpdesk extension types you can set this to False. + +- **HELPDESK_ANON_ACCESS_RAISES_404** If True, redirects user to a 404 page when attempting to reach ticket pages while not logged in, rather than redirecting to a login screen. + + **Default:** ``HELPDESK_ANON_ACCESS_RAISES_404 = False`` + +Generic Options +--------------- +These changes are visible throughout django-helpdesk + - **HELPDESK_KB_ENABLED** show knowledgebase links? **Default:** ``HELPDESK_KB_ENABLED = True`` @@ -85,20 +103,10 @@ These changes are visible throughout django-helpdesk **Default:** ``HELPDESK_MAX_EMAIL_ATTACHMENT_SIZE = 512000`` -- **HELPDESK_VALID_EXTENSIONS** Valid extensions for file types that can be attached to tickets - - **Default:** ``HELPDESK_VALID_EXTENSIONS = ['.txt', '.asc', '.htm', '.html', '.pdf', '.doc', '.docx', '.odt', '.jpg', '.png', '.eml'] - -- **HELPDESK_VALIDATE_ATTACHMENT_TYPES** If you'd like to turn of filtering of helpdesk extension types you can set this to False. - - **QUEUE_EMAIL_BOX_UPDATE_ONLY** Only process mail with a valid tracking ID; all other mail will be ignored instead of creating a new ticket. **Default:** ``QUEUE_EMAIL_BOX_UPDATE_ONLY = False`` -- **HELPDESK_ANON_ACCESS_RAISES_404** If True, redirects user to a 404 page when attempting to reach ticket pages while not logged in, rather than redirecting to a login screen. - - **Default:** ``HELPDESK_ANON_ACCESS_RAISES_404 = False`` - - **HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET** If False, disable the dependencies fields on ticket. **Default:** ``HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET = True``