mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-03 00:15:20 +00:00
perf: applet host accounts should be inactive by default
This commit is contained in:
@@ -11,7 +11,6 @@ from common.db.models import JMSBaseModel
|
|||||||
from common.utils import random_string
|
from common.utils import random_string
|
||||||
from assets.models import Host
|
from assets.models import Host
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['AppletHost', 'AppletHostDeployment']
|
__all__ = ['AppletHost', 'AppletHostDeployment']
|
||||||
|
|
||||||
|
|
||||||
@@ -95,7 +94,7 @@ class AppletHost(Host):
|
|||||||
account = account_model(
|
account = account_model(
|
||||||
username=username, secret=password, name=username,
|
username=username, secret=password, name=username,
|
||||||
asset_id=self.id, secret_type='password', version=1,
|
asset_id=self.id, secret_type='password', version=1,
|
||||||
org_id=self.LOCKING_ORG
|
org_id=self.LOCKING_ORG, is_active=False,
|
||||||
)
|
)
|
||||||
accounts.append(account)
|
accounts.append(account)
|
||||||
bulk_create_with_history(accounts, account_model, batch_size=20)
|
bulk_create_with_history(accounts, account_model, batch_size=20)
|
||||||
|
Reference in New Issue
Block a user