|
|
@ -35,13 +35,13 @@ class AdminUser(models.Model):
|
|
|
|
username = models.CharField(max_length=16, verbose_name=_('Username'))
|
|
|
|
username = models.CharField(max_length=16, verbose_name=_('Username'))
|
|
|
|
_password = models.CharField(
|
|
|
|
_password = models.CharField(
|
|
|
|
max_length=256, blank=True, null=True, verbose_name=_('Password'))
|
|
|
|
max_length=256, blank=True, null=True, verbose_name=_('Password'))
|
|
|
|
_private_key = models.CharField(max_length=4096, blank=True, null=True, verbose_name=_('SSH private key'),
|
|
|
|
_private_key = models.TextField(max_length=4096, blank=True, null=True, verbose_name=_('SSH private key'),
|
|
|
|
validators=[private_key_validator,])
|
|
|
|
validators=[private_key_validator,])
|
|
|
|
become = models.BooleanField(default=True)
|
|
|
|
become = models.BooleanField(default=True)
|
|
|
|
become_method = models.CharField(choices=BECOME_METHOD_CHOICES, default='sudo', max_length=4)
|
|
|
|
become_method = models.CharField(choices=BECOME_METHOD_CHOICES, default='sudo', max_length=4)
|
|
|
|
become_user = models.CharField(default='root', max_length=64)
|
|
|
|
become_user = models.CharField(default='root', max_length=64)
|
|
|
|
become_pass = models.CharField(default='', max_length=128)
|
|
|
|
become_pass = models.CharField(default='', max_length=128)
|
|
|
|
_public_key = models.CharField(
|
|
|
|
_public_key = models.TextField(
|
|
|
|
max_length=4096, blank=True, verbose_name=_('SSH public key'))
|
|
|
|
max_length=4096, blank=True, verbose_name=_('SSH public key'))
|
|
|
|
comment = models.TextField(blank=True, verbose_name=_('Comment'))
|
|
|
|
comment = models.TextField(blank=True, verbose_name=_('Comment'))
|
|
|
|
date_created = models.DateTimeField(auto_now_add=True, null=True)
|
|
|
|
date_created = models.DateTimeField(auto_now_add=True, null=True)
|
|
|
@ -138,9 +138,9 @@ class SystemUser(models.Model):
|
|
|
|
max_length=256, blank=True, verbose_name=_('Password'))
|
|
|
|
max_length=256, blank=True, verbose_name=_('Password'))
|
|
|
|
protocol = models.CharField(
|
|
|
|
protocol = models.CharField(
|
|
|
|
max_length=16, choices=PROTOCOL_CHOICES, default='ssh', verbose_name=_('Protocol'))
|
|
|
|
max_length=16, choices=PROTOCOL_CHOICES, default='ssh', verbose_name=_('Protocol'))
|
|
|
|
_private_key = models.CharField(
|
|
|
|
_private_key = models.TextField(
|
|
|
|
max_length=8192, blank=True, verbose_name=_('SSH private key'))
|
|
|
|
max_length=8192, blank=True, verbose_name=_('SSH private key'))
|
|
|
|
_public_key = models.CharField(
|
|
|
|
_public_key = models.TextField(
|
|
|
|
max_length=8192, blank=True, verbose_name=_('SSH public key'))
|
|
|
|
max_length=8192, blank=True, verbose_name=_('SSH public key'))
|
|
|
|
auth_method = models.CharField(choices=AUTH_METHOD_CHOICES, default='K',
|
|
|
|
auth_method = models.CharField(choices=AUTH_METHOD_CHOICES, default='K',
|
|
|
|
max_length=1, verbose_name=_('Auth method'))
|
|
|
|
max_length=1, verbose_name=_('Auth method'))
|
|
|
|