1
0
mirror of https://github.com/jumpserver/jumpserver.git synced 2025-05-05 06:36:51 +00:00

perf: 不满足自动登录勾选条件时从禁用修改为隐藏

This commit is contained in:
wangruidong 2024-03-07 15:20:31 +08:00 committed by Bryan
parent 2e067a7950
commit 6de524c797

View File

@ -43,6 +43,8 @@ class UserLoginForm(forms.Form):
super().__init__(*args, **kwargs)
auto_login_field = self.fields['auto_login']
auto_login_field.label = _("{} days auto login").format(self.days_auto_login or 1)
if self.disable_days_auto_login:
auto_login_field.widget = forms.HiddenInput()
def confirm_login_allowed(self, user):
if not user.is_staff: