mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-02 17:52:11 +00:00
* perf: 改密与推送保持一致 * perf: 增加 i18n --------- Co-authored-by: feng <1304903146@qq.com> Co-authored-by: Bai <baijiangjie@gmail.com>
33 lines
1009 B
Python
33 lines
1009 B
Python
from accounts.const import AutomationTypes
|
|
from accounts.models import PushAccountAutomation
|
|
from .change_secret import (
|
|
ChangeSecretAutomationSerializer, ChangeSecretUpdateAssetSerializer,
|
|
ChangeSecretUpdateNodeSerializer
|
|
)
|
|
|
|
|
|
class PushAccountAutomationSerializer(ChangeSecretAutomationSerializer):
|
|
|
|
class Meta(ChangeSecretAutomationSerializer.Meta):
|
|
model = PushAccountAutomation
|
|
fields = [
|
|
n for n in ChangeSecretAutomationSerializer.Meta.fields
|
|
if n not in ['recipients']
|
|
]
|
|
|
|
@property
|
|
def model_type(self):
|
|
return AutomationTypes.push_account
|
|
|
|
|
|
class PushAccountUpdateAssetSerializer(ChangeSecretUpdateAssetSerializer):
|
|
class Meta:
|
|
model = PushAccountAutomation
|
|
fields = ChangeSecretUpdateAssetSerializer.Meta.fields
|
|
|
|
|
|
class PushAccountUpdateNodeSerializer(ChangeSecretUpdateNodeSerializer):
|
|
class Meta:
|
|
model = PushAccountAutomation
|
|
fields = ChangeSecretUpdateNodeSerializer.Meta.fields
|