Commit bd14266a authored by BaiJiangJie's avatar BaiJiangJie

[Update] 修改登录日志模型类的MFA字段默认状态为-

parent 88f36c6f
...@@ -72,7 +72,7 @@ class LoginLog(models.Model): ...@@ -72,7 +72,7 @@ class LoginLog(models.Model):
ip = models.GenericIPAddressField(verbose_name=_('Login ip')) ip = models.GenericIPAddressField(verbose_name=_('Login ip'))
city = models.CharField(max_length=254, blank=True, null=True, verbose_name=_('Login city')) city = models.CharField(max_length=254, blank=True, null=True, verbose_name=_('Login city'))
user_agent = models.CharField(max_length=254, blank=True, null=True, verbose_name=_('User agent')) user_agent = models.CharField(max_length=254, blank=True, null=True, verbose_name=_('User agent'))
mfa = models.SmallIntegerField(default=MFA_DISABLED, choices=MFA_CHOICE, verbose_name=_('MFA')) mfa = models.SmallIntegerField(default=MFA_UNKNOWN, choices=MFA_CHOICE, verbose_name=_('MFA'))
reason = models.SmallIntegerField(default=REASON_NOTHING, choices=REASON_CHOICE, verbose_name=_('Reason')) reason = models.SmallIntegerField(default=REASON_NOTHING, choices=REASON_CHOICE, verbose_name=_('Reason'))
status = models.BooleanField(max_length=2, default=True, choices=STATUS_CHOICE, verbose_name=_('Status')) status = models.BooleanField(max_length=2, default=True, choices=STATUS_CHOICE, verbose_name=_('Status'))
datetime = models.DateTimeField(auto_now_add=True, verbose_name=_('Date login')) datetime = models.DateTimeField(auto_now_add=True, verbose_name=_('Date login'))
......
...@@ -22,7 +22,6 @@ from common.utils import reverse, get_object_or_none ...@@ -22,7 +22,6 @@ from common.utils import reverse, get_object_or_none
from common.models import Setting from common.models import Setting
from common.forms import SecuritySettingForm from common.forms import SecuritySettingForm
from .models import User, LoginLog from .models import User, LoginLog
# from .tasks import write_login_log_async
logger = logging.getLogger('jumpserver') logger = logging.getLogger('jumpserver')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment