mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-03 08:25:04 +00:00
perf: directory service db
This commit is contained in:
@@ -141,16 +141,14 @@ class Account(AbsConnectivity, LabeledMixin, BaseAccount, JSONFilterMixin):
|
||||
def is_ds_account(self):
|
||||
if self.username.startswith('@'):
|
||||
return False
|
||||
if self.platform.category == 'ds':
|
||||
return True
|
||||
return False
|
||||
if not self.asset.is_directory_service:
|
||||
return False
|
||||
return True
|
||||
|
||||
@lazyproperty
|
||||
def ds(self):
|
||||
if not self.is_ds_account():
|
||||
return None
|
||||
if not hasattr(self.asset, 'ds'):
|
||||
return None
|
||||
return self.asset.ds
|
||||
|
||||
@lazyproperty
|
||||
|
Reference in New Issue
Block a user