perf: 硬件设备支持账号切换

pull/10036/head^2
ibuler 2 years ago committed by Jiangjie.Bai
parent 463d54a4d8
commit 47c207ce13

@ -15,7 +15,10 @@ class DeviceTypes(BaseType):
'*': {
'charset_enabled': False,
'domain_enabled': True,
'su_enabled': False,
'su_enabled': True,
'su_methods': [
{'name': 'enable', 'id': 'enable'},
]
}
}

@ -20,8 +20,8 @@ class HostTypes(BaseType):
'domain_enabled': True,
'su_enabled': True,
'su_methods': [
{'name': 'sudo su', 'id': 'sudo su'},
{'name': 'su -', 'id': 'su -'}
{'name': 'sudo su -', 'id': 'sudo'},
{'name': 'su -', 'id': 'su'}
],
},
cls.WINDOWS: {

@ -95,7 +95,7 @@ class PlatformSerializer(WritableNestedModelSerializer):
)
automation = PlatformAutomationSerializer(label=_("Automation"), required=False)
su_method = LabeledChoiceField(
choices=[("sudo", "sudo su -"), ("su", "su - ")],
choices=[("sudo", "sudo su -"), ("su", "su - "), ("enable", "enable")],
label=_("Su method"), required=False, default="sudo", allow_null=True
)

Loading…
Cancel
Save