mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-10 03:39:59 +00:00
fix: Account risk page change secret failed
This commit is contained in:
@@ -130,9 +130,10 @@ class RiskHandler:
|
|||||||
def handle_change_password(self):
|
def handle_change_password(self):
|
||||||
asset = self.asset
|
asset = self.asset
|
||||||
execution = AutomationExecution()
|
execution = AutomationExecution()
|
||||||
|
account = self.asset.accounts.get(username=self.username)
|
||||||
execution.snapshot = {
|
execution.snapshot = {
|
||||||
"assets": [str(asset.id)],
|
"assets": [str(asset.id)],
|
||||||
"accounts": [self.username],
|
"accounts": [str(account.id)],
|
||||||
"type": AutomationTypes.change_secret,
|
"type": AutomationTypes.change_secret,
|
||||||
"secret_type": "password",
|
"secret_type": "password",
|
||||||
"secret_strategy": "random",
|
"secret_strategy": "random",
|
||||||
|
Reference in New Issue
Block a user