Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
dkmstr committed Feb 11, 2025
2 parents 803c8ba + 92eee92 commit 475fefb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/src/uds/core/util/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def value(
@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
Expand Down
15 changes: 15 additions & 0 deletions server/src/uds/transports/HTML5RDP/html5rdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -491,6 +498,14 @@ def sanitize(text: str) -> str:
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())
Expand Down
3 changes: 0 additions & 3 deletions server/src/uds/web/views/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
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

Expand All @@ -46,7 +44,6 @@
logger = logging.getLogger(__name__)


@weblogin_required(role=consts.UserRole.STAFF)
def download(request: 'HttpRequest', download_id: str) -> 'HttpResponse':
"""
Downloadables management
Expand Down

0 comments on commit 475fefb

Please sign in to comment.