mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-12-21 03:26:03 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd50a1faff |
2
GITSHA
2
GITSHA
@@ -1 +1 @@
|
|||||||
a098bc6c06c9762b7d596d28865d5e5f1afe033e
|
86dab4fc6ea6b683efbe384a0694af4edb9f6716
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ from django.db import models
|
|||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from accounts.const import AutomationTypes
|
from accounts.const import AutomationTypes
|
||||||
from jumpserver.utils import has_valid_xpack_license
|
|
||||||
from .base import AccountBaseAutomation
|
from .base import AccountBaseAutomation
|
||||||
from .change_secret import ChangeSecretMixin
|
from .change_secret import ChangeSecretMixin
|
||||||
|
|
||||||
@@ -28,8 +27,6 @@ class PushAccountAutomation(ChangeSecretMixin, AccountBaseAutomation):
|
|||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
self.type = AutomationTypes.push_account
|
self.type = AutomationTypes.push_account
|
||||||
if not has_valid_xpack_license():
|
|
||||||
self.is_periodic = False
|
|
||||||
super().save(*args, **kwargs)
|
super().save(*args, **kwargs)
|
||||||
|
|
||||||
def to_attr_json(self):
|
def to_attr_json(self):
|
||||||
|
|||||||
@@ -306,11 +306,10 @@ class AllTypes(ChoicesMixin):
|
|||||||
protocols_data = deepcopy(default_protocols)
|
protocols_data = deepcopy(default_protocols)
|
||||||
if _protocols:
|
if _protocols:
|
||||||
protocols_data = [p for p in protocols_data if p['name'] in _protocols]
|
protocols_data = [p for p in protocols_data if p['name'] in _protocols]
|
||||||
|
|
||||||
for p in protocols_data:
|
for p in protocols_data:
|
||||||
setting = _protocols_setting.get(p['name'], {})
|
setting = _protocols_setting.get(p['name'], {})
|
||||||
p['required'] = setting.pop('required', False)
|
p['required'] = p.pop('required', False)
|
||||||
p['default'] = setting.pop('default', False)
|
p['default'] = p.pop('default', False)
|
||||||
p['setting'] = {**p.get('setting', {}), **setting}
|
p['setting'] = {**p.get('setting', {}), **setting}
|
||||||
|
|
||||||
platform_data = {
|
platform_data = {
|
||||||
|
|||||||
Reference in New Issue
Block a user