mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-27 07:44:23 +00:00
perf: 重构工单处理流程 (#5408)
* perf: 重构工单处理流程 * perf: 重构工单处理流程 (1) * perf: 重构工单处理流程 (2) * perf: 重构工单处理流程 (3) * perf: 重构工单处理流程 (4) * perf: 重构工单处理流程 (5) * perf: 重构工单处理流程 (6) Co-authored-by: Bai <bugatti_it@163.com>
This commit is contained in:
@@ -207,12 +207,13 @@ class SystemUser(BaseUser):
|
||||
@classmethod
|
||||
def get_protocol_by_application_type(cls, app_type):
|
||||
from applications.const import ApplicationTypeChoices
|
||||
if app_type in ApplicationTypeChoices.remote_app_types():
|
||||
if app_type in cls.APPLICATION_CATEGORY_PROTOCOLS:
|
||||
protocol = app_type
|
||||
elif app_type in ApplicationTypeChoices.remote_app_types():
|
||||
protocol = cls.PROTOCOL_RDP
|
||||
else:
|
||||
protocol = app_type
|
||||
if protocol in cls.APPLICATION_CATEGORY_PROTOCOLS:
|
||||
return protocol
|
||||
protocol = None
|
||||
return protocol
|
||||
|
||||
class Meta:
|
||||
ordering = ['name']
|
||||
|
Reference in New Issue
Block a user