1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-03-20 06:50:23 +03:00

Merge remote-tracking branch 'origin/v4.0'

This commit is contained in:
Adolfo Gómez García 2025-02-11 16:21:30 +01:00
commit 475fefbbfd
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23
3 changed files with 16 additions and 4 deletions

View File

@ -287,7 +287,7 @@ class Config:
@staticmethod
def enumerate() -> collections.abc.Iterable['Config.Value']:
GlobalConfig.initialize() # Ensures DB contains all values
for cfg in DBConfig.objects.all().order_by('key'): # @UndefinedVariable
for cfg in DBConfig.objects.all().order_by('key'):
# Skip sections with name starting with "__" (not to be editted on configuration)
if cfg.section.startswith('__'): # Hidden section:
continue

View File

@ -303,6 +303,13 @@ class HTML5RDPTransport(transports.Transport):
old_field_name='customGEPath',
)
support_params = ui.gui.TextField(
label=_('Support parameters'),
order=999,
tooltip=_('Support provided parameters. Do not modify'),
tab=types.ui.Tab.ADVANCED,
)
def initialize(self, values: 'types.core.ValuesType') -> None:
if not values:
return
@ -491,6 +498,14 @@ class HTML5RDPTransport(transports.Transport):
if self.smooth.as_bool():
params['enable-font-smoothing'] = 'true'
# if support_params is not empty, add it to the params
# a comma separated list of key=value pairs
if self.support_params.value.strip():
for param in self.support_params.value.split(','):
if '=' in param:
key, value = param.split('=', 1)
params[key.strip()] = value.strip()
logger.debug('RDP Params: %s', params)
ticket = models.TicketStore.create(params, validity=self.ticket_validity.as_int())

View File

@ -31,8 +31,6 @@ Author: Adolfo Gómez, dkmaster at dkmon dot com
import logging
import typing
from uds.core import consts
from uds.core.auths.auth import weblogin_required
from uds.core.managers import downloads_manager
from .main import index
@ -46,7 +44,6 @@ if typing.TYPE_CHECKING:
logger = logging.getLogger(__name__)
@weblogin_required(role=consts.UserRole.STAFF)
def download(request: 'HttpRequest', download_id: str) -> 'HttpResponse':
"""
Downloadables management