Browse Source

[Bugfix] Change user public key length to 5000, fixed #631

pull/756/head^2
ibuler 7 years ago
parent
commit
2ae3bec335
  1. 1
      apps/perms/api.py
  2. 2
      apps/users/models/user.py

1
apps/perms/api.py

@ -51,7 +51,6 @@ class AssetPermissionViewSet(viewsets.ModelViewSet):
assets.extend(list(instance.assets.all()))
asset_groups.extend(list(instance.asset_groups.all()))
system_users.extend(list(instance.system_users.all()))
print('Run')
associate_system_users_and_assets(system_users, assets, asset_groups)
def perform_create(self, serializer):

2
apps/users/models/user.py

@ -39,7 +39,7 @@ class User(AbstractUser):
enable_otp = models.BooleanField(default=False, verbose_name=_('Enable OTP'))
secret_key_otp = models.CharField(max_length=16, blank=True)
_private_key = models.CharField(max_length=5000, blank=True, verbose_name=_('ssh private key'))
_public_key = models.CharField(max_length=1000, blank=True, verbose_name=_('ssh public key'))
_public_key = models.CharField(max_length=5000, blank=True, verbose_name=_('ssh public key'))
comment = models.TextField(max_length=200, blank=True, verbose_name=_('Comment'))
is_first_login = models.BooleanField(default=False)
date_expired = models.DateTimeField(default=date_expired_default, blank=True, null=True,

Loading…
Cancel
Save