mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-08 04:19:03 +00:00
perf: update ad domain
This commit is contained in:
parent
4cc1687bf8
commit
75ea0079a2
@ -256,6 +256,8 @@ class ConnectionToken(JMSOrgBaseModel):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def set_ad_domain_if_need(self, account):
|
def set_ad_domain_if_need(self, account):
|
||||||
|
if not self.protocol == 'rdp':
|
||||||
|
return
|
||||||
rdp = self.asset.platform.protocols.filter(name='rdp').first()
|
rdp = self.asset.platform.protocols.filter(name='rdp').first()
|
||||||
if not rdp or not rdp.setting:
|
if not rdp or not rdp.setting:
|
||||||
return
|
return
|
||||||
@ -279,9 +281,8 @@ class ConnectionToken(JMSOrgBaseModel):
|
|||||||
account = self.asset.all_valid_accounts.filter(id=self.account).first()
|
account = self.asset.all_valid_accounts.filter(id=self.account).first()
|
||||||
if not account.secret and self.input_secret:
|
if not account.secret and self.input_secret:
|
||||||
account.secret = self.input_secret
|
account.secret = self.input_secret
|
||||||
|
|
||||||
if self.protocol == 'rdp':
|
|
||||||
self.set_ad_domain_if_need(account)
|
self.set_ad_domain_if_need(account)
|
||||||
|
|
||||||
return account
|
return account
|
||||||
|
|
||||||
@lazyproperty
|
@lazyproperty
|
||||||
|
Loading…
Reference in New Issue
Block a user