mirror of https://github.com/jumpserver/jumpserver
perf: support only su or sudo
parent
2b133a8085
commit
9b6b48a7f1
|
@ -19,7 +19,7 @@ class HostTypes(BaseType):
|
|||
'charset': 'utf-8', # default
|
||||
'domain_enabled': True,
|
||||
'su_enabled': True,
|
||||
'su_methods': ['sudo', 'su'],
|
||||
'su_methods': ['sudo', 'su', 'only_sudo', 'only_su'],
|
||||
},
|
||||
cls.WINDOWS: {
|
||||
'su_enabled': False,
|
||||
|
|
|
@ -127,6 +127,8 @@ class PlatformSerializer(ResourceLabelsMixin, WritableNestedModelSerializer):
|
|||
SU_METHOD_CHOICES = [
|
||||
("sudo", "sudo su -"),
|
||||
("su", "su - "),
|
||||
("only_sudo", "sudo su"),
|
||||
("only_su", "su"),
|
||||
("enable", "enable"),
|
||||
("super", "super 15"),
|
||||
("super_level", "super level 15")
|
||||
|
|
Loading…
Reference in New Issue