mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-05 09:21:02 +00:00
feat: 添加限制用户只能从source登录的功能 (#5592)
* stash it * feat: 添加限制用户只能从source登录的功能 * fix: 修复小错误 Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
@@ -12,9 +12,21 @@ __all__ = [
|
||||
'UserProfileForm', 'UserMFAForm', 'UserFirstLoginFinishForm',
|
||||
'UserPasswordForm', 'UserPublicKeyForm', 'FileForm',
|
||||
'UserTokenResetPasswordForm', 'UserForgotPasswordForm',
|
||||
'UserCheckPasswordForm', 'UserCheckOtpCodeForm'
|
||||
]
|
||||
|
||||
|
||||
class UserCheckPasswordForm(forms.Form):
|
||||
password = forms.CharField(
|
||||
label=_('Password'), widget=forms.PasswordInput,
|
||||
max_length=128, strip=False
|
||||
)
|
||||
|
||||
|
||||
class UserCheckOtpCodeForm(forms.Form):
|
||||
otp_code = forms.CharField(label=_('MFA code'), max_length=6)
|
||||
|
||||
|
||||
class UserProfileForm(forms.ModelForm):
|
||||
username = forms.CharField(disabled=True, label=_("Username"))
|
||||
name = forms.CharField(disabled=True, label=_("Name"))
|
||||
|
Reference in New Issue
Block a user