mirror of https://github.com/jumpserver/jumpserver
perf: 硬件设备支持账号切换
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…
Reference in New Issue