diff --git a/apps/users/models.py b/apps/users/models.py index 2681a2470..84c34c48c 100644 --- a/apps/users/models.py +++ b/apps/users/models.py @@ -113,6 +113,8 @@ class User(AbstractUser): private_key = models.CharField(max_length=5000, blank=True, verbose_name='ssh私钥') # ssh key max length 4096 bit public_key = models.CharField(max_length=1000, blank=True, verbose_name='公钥') comment = models.TextField(max_length=200, blank=True, verbose_name='描述') + confirmed = models.BooleanField(default=False) + date_confirmed = models.DateField(blank=True, null=True, verbose_name='确认时间') date_expired = models.DateTimeField(default=date_expired_default, blank=True, null=True, verbose_name='有效期') created_by = models.CharField(max_length=30, default='') diff --git a/apps/users/views.py b/apps/users/views.py index a006b3a6c..26acb7fd3 100644 --- a/apps/users/views.py +++ b/apps/users/views.py @@ -18,7 +18,7 @@ from django.contrib.auth import authenticate, login, logout from .models import User, UserGroup from .forms import UserAddForm, UserUpdateForm, UserGroupForm, UserLoginForm -from .utils import AdminUserRequiredMixin +from .utils import AdminUserRequiredMixin, ssh_key_gen logger = logging.getLogger('jumpserver.users.views')