mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-25 01:13:31 +01:00
Added the default permission in settings.py
This commit is contained in:
parent
90bcac954f
commit
11327e7469
@ -1144,7 +1144,7 @@ class FollowUpAttachment(Attachment):
|
|||||||
att_path = os.path.join(settings.MEDIA_ROOT, path)
|
att_path = os.path.join(settings.MEDIA_ROOT, path)
|
||||||
if settings.DEFAULT_FILE_STORAGE == "django.core.files.storage.FileSystemStorage":
|
if settings.DEFAULT_FILE_STORAGE == "django.core.files.storage.FileSystemStorage":
|
||||||
if not os.path.exists(att_path):
|
if not os.path.exists(att_path):
|
||||||
os.makedirs(att_path, 0o755)
|
os.makedirs(att_path, helpdesk_settings.HELPDESK_ATTACHMENT_DIR_PERMS)
|
||||||
return os.path.join(path, filename)
|
return os.path.join(path, filename)
|
||||||
|
|
||||||
|
|
||||||
@ -1164,7 +1164,7 @@ class KBIAttachment(Attachment):
|
|||||||
att_path = os.path.join(settings.MEDIA_ROOT, path)
|
att_path = os.path.join(settings.MEDIA_ROOT, path)
|
||||||
if settings.DEFAULT_FILE_STORAGE == "django.core.files.storage.FileSystemStorage":
|
if settings.DEFAULT_FILE_STORAGE == "django.core.files.storage.FileSystemStorage":
|
||||||
if not os.path.exists(att_path):
|
if not os.path.exists(att_path):
|
||||||
os.makedirs(att_path, 0o755)
|
os.makedirs(att_path, helpdesk_settings.HELPDESK_ATTACHMENT_DIR_PERMS)
|
||||||
return os.path.join(path, filename)
|
return os.path.join(path, filename)
|
||||||
|
|
||||||
|
|
||||||
|
@ -265,3 +265,11 @@ HELPDESK_OAUTH = getattr(
|
|||||||
|
|
||||||
# Set Debug Logging Level for IMAP Services. Default to '0' for No Debugging
|
# Set Debug Logging Level for IMAP Services. Default to '0' for No Debugging
|
||||||
HELPDESK_IMAP_DEBUG_LEVEL = getattr(settings, 'HELPDESK_IMAP_DEBUG_LEVEL', 0)
|
HELPDESK_IMAP_DEBUG_LEVEL = getattr(settings, 'HELPDESK_IMAP_DEBUG_LEVEL', 0)
|
||||||
|
|
||||||
|
#############################################
|
||||||
|
# file permissions - Attachment directories #
|
||||||
|
#############################################
|
||||||
|
|
||||||
|
# Attachment directories should be created with permission 755 (rwxr-xr-x)
|
||||||
|
# Override it in your own Django settings.py
|
||||||
|
HELPDESK_ATTACHMENT_DIR_PERMS = int(getattr(settings, 'HELPDESK_ATTACHMENT_DIR_PERMS', "755"), 8)
|
||||||
|
Loading…
Reference in New Issue
Block a user