mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-10-23 16:58:51 +00:00
perf: 优化 xpack license 检查 (#11885)
Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
@@ -75,7 +75,7 @@ class NativeClient(TextChoices):
|
||||
xpack_protocols = Protocol.xpack_protocols()
|
||||
|
||||
for protocol, _clients in clients_map.items():
|
||||
if not settings.XPACK_ENABLED and protocol in xpack_protocols:
|
||||
if not settings.XPACK_LICENSE_IS_VALID and protocol in xpack_protocols:
|
||||
continue
|
||||
if isinstance(_clients, dict):
|
||||
if os == 'all':
|
||||
@@ -83,7 +83,7 @@ class NativeClient(TextChoices):
|
||||
else:
|
||||
_clients = _clients.get(os, _clients['default'])
|
||||
for client in _clients:
|
||||
if not settings.XPACK_ENABLED and client in cls.xpack_methods():
|
||||
if not settings.XPACK_LICENSE_IS_VALID and client in cls.xpack_methods():
|
||||
continue
|
||||
methods[protocol].append({
|
||||
'value': client.value,
|
||||
|
Reference in New Issue
Block a user