1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-02-02 09:47:13 +03:00

Update HTML5RDPTransport drive name configuration to allow reading from settings file GUACAMOLE_DRIVE_NAME

This commit is contained in:
Adolfo Gómez García 2024-09-11 16:18:33 +02:00
parent a61514cd3d
commit efc4244367
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23
2 changed files with 8 additions and 2 deletions

View File

@ -262,6 +262,7 @@ INSTALLED_APPS = (
# Tests runner is default tests runner
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
# GUACAMOLE_DRIVE_NAME = 'UDSfs'
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.

View File

@ -35,6 +35,7 @@ import re
import typing
from django.utils.translation import gettext_noop as _
from django.conf import settings
from uds import models
from uds.core import transports, types, ui, consts
@ -247,7 +248,7 @@ class HTML5RDPTransport(transports.Transport):
tab=types.ui.Tab.ADVANCED,
old_field_name='forceNewWindow',
)
security = ui.gui.ChoiceField(
order=92,
label=_('Security'),
@ -428,7 +429,11 @@ class HTML5RDPTransport(transports.Transport):
'enable-drive': as_txt(self.enable_file_sharing.value in ('true', 'down', 'up')),
'disable-upload': as_txt(self.enable_file_sharing.value not in ('true', 'up')),
'drive-path': f'/share/{user.uuid}',
'drive-name': 'UDSfs',
'drive-name': (
settings.GUACAMOLE_DRIVE_NAME
if hasattr(settings, 'GUACAMOLE_DRIVE_NAME') and settings.GUACAMOLE_DRIVE_NAME
else 'UDSfs'
),
'disable-copy': as_txt(self.enable_clipboard.value in ('dis-copy', 'disabled')),
'disable-paste': as_txt(self.enable_clipboard.value in ('dis-paste', 'disabled')),
'create-drive-path': 'true',