fix: 关闭ssh client后,sftp,telnet不显示客户端连接方式

pull/13266/head
wangruidong 6 months ago committed by 老广
parent a534c496d0
commit 606d2c8933

@ -253,8 +253,9 @@ class ConnectMethodUtil:
def _filter_disable_protocols_connect_methods(cls, methods): def _filter_disable_protocols_connect_methods(cls, methods):
# 过滤一些特殊的协议方式 # 过滤一些特殊的协议方式
if not getattr(settings, 'TERMINAL_KOKO_SSH_ENABLED'): if not getattr(settings, 'TERMINAL_KOKO_SSH_ENABLED'):
protocol = Protocol.ssh disable_ssh_client_protocols = [Protocol.ssh, Protocol.sftp, Protocol.telnet]
methods[protocol] = [m for m in methods[protocol] if m['type'] != 'native'] for protocol in disable_ssh_client_protocols:
methods[protocol] = [m for m in methods[protocol] if m['type'] != 'native']
return methods return methods
@classmethod @classmethod

Loading…
Cancel
Save