mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-13 13:17:54 +03:00
Added custom parameters for freerdp mac clients.
distinct from linux custom parameters.
This commit is contained in:
parent
5597af7d85
commit
9f04bdab05
@ -87,6 +87,7 @@ class RDPTransport(BaseRDPTransport):
|
||||
smartcardString = BaseRDPTransport.smartcardString
|
||||
customParameters = BaseRDPTransport.customParameters
|
||||
allowMacMSRDC = BaseRDPTransport.allowMacMSRDC
|
||||
customParametersMAC = BaseRDPTransport.customParametersMAC
|
||||
|
||||
def getUDSTransportScript( # pylint: disable=too-many-locals
|
||||
self,
|
||||
@ -169,6 +170,7 @@ class RDPTransport(BaseRDPTransport):
|
||||
'address': r.address,
|
||||
})
|
||||
else: # Mac
|
||||
r.linuxCustomParameters = self.customParametersMAC.value
|
||||
sp.update({
|
||||
'as_new_xfreerdp_params': r.as_new_xfreerdp_params,
|
||||
'as_rdp_url': r.as_rdp_url if self.allowMacMSRDC.isTrue() else '',
|
||||
|
@ -288,7 +288,7 @@ class BaseRDPTransport(transports.Transport):
|
||||
|
||||
allowMacMSRDC = gui.CheckBoxField(
|
||||
label=_('Allow Microsoft Rdp Client'),
|
||||
order=40,
|
||||
order=50,
|
||||
tooltip=_(
|
||||
'If checked, allows use of Microsoft Remote Desktop Client. PASSWORD WILL BE PROMPTED!'
|
||||
),
|
||||
@ -296,6 +296,16 @@ class BaseRDPTransport(transports.Transport):
|
||||
defvalue=gui.FALSE,
|
||||
)
|
||||
|
||||
customParametersMAC = gui.TextField(
|
||||
label=_('Custom parameters'),
|
||||
order=51,
|
||||
tooltip=_(
|
||||
'If not empty, extra parameter to include for Mac OS X Freerdp Client (for example /usb:id,dev:054c:0268, or aything compatible with your xfreerdp client)'
|
||||
),
|
||||
tab='Mac OS X',
|
||||
length=256,
|
||||
)
|
||||
|
||||
def isAvailableFor(self, userService: 'models.UserService', ip: str) -> bool:
|
||||
"""
|
||||
Checks if the transport is available for the requested destination ip
|
||||
|
@ -125,6 +125,7 @@ class TRDPTransport(BaseRDPTransport):
|
||||
smartcardString = BaseRDPTransport.smartcardString
|
||||
customParameters = BaseRDPTransport.customParameters
|
||||
allowMacMSRDC = BaseRDPTransport.allowMacMSRDC
|
||||
customParametersMAC = BaseRDPTransport.customParametersMAC
|
||||
|
||||
def initialize(self, values: 'Module.ValuesType'):
|
||||
if values:
|
||||
@ -228,6 +229,7 @@ class TRDPTransport(BaseRDPTransport):
|
||||
}
|
||||
)
|
||||
else: # Mac
|
||||
r.linuxCustomParameters = self.customParametersMAC.value
|
||||
sp.update(
|
||||
{
|
||||
'as_new_xfreerdp_params': r.as_new_xfreerdp_params,
|
||||
|
Loading…
Reference in New Issue
Block a user