diff --git a/apps/assets/const/database.py b/apps/assets/const/database.py index 261373688..fb0f61e81 100644 --- a/apps/assets/const/database.py +++ b/apps/assets/const/database.py @@ -36,6 +36,7 @@ class DatabaseTypes(BaseType): 'verify_account_enabled': True, 'change_secret_enabled': True, 'push_account_enabled': True, + 'remove_account_enabled': True, }, cls.REDIS: { 'ansible_enabled': False, diff --git a/apps/assets/const/host.py b/apps/assets/const/host.py index be8f1d1bf..f408e5e5e 100644 --- a/apps/assets/const/host.py +++ b/apps/assets/const/host.py @@ -53,7 +53,9 @@ class HostTypes(BaseType): 'gather_accounts_enabled': True, 'verify_account_enabled': True, 'change_secret_enabled': True, - 'push_account_enabled': True + 'push_account_enabled': True, + 'remove_account_enabled': True, + }, cls.WINDOWS: { 'ansible_config': { diff --git a/apps/assets/serializers/platform.py b/apps/assets/serializers/platform.py index f9bf8230e..3441ac6f4 100644 --- a/apps/assets/serializers/platform.py +++ b/apps/assets/serializers/platform.py @@ -27,6 +27,7 @@ class PlatformAutomationSerializer(serializers.ModelSerializer): "change_secret_enabled", "change_secret_method", "change_secret_params", "verify_account_enabled", "verify_account_method", "verify_account_params", "gather_accounts_enabled", "gather_accounts_method", "gather_accounts_params", + "remove_account_enabled", "remove_account_method", "remove_account_params", ] extra_kwargs = { # 启用资产探测 @@ -67,6 +68,14 @@ class PlatformAutomationSerializer(serializers.ModelSerializer): "gather_accounts_method": { "label": _("Gather accounts method"), }, + "remove_account_method": { + "label": _("Remove account method"), + }, + "remove_account_enabled": { + "label": _("Remove accounts enabled"), + "help_text": _("Enable account remove"), + }, + }