mirror of https://github.com/jumpserver/jumpserver
pref: remove user source choice
parent
7d64b8419f
commit
8aa707427f
|
@ -913,6 +913,7 @@
|
|||
"Resume": "Recovery",
|
||||
"ResumeTaskSendSuccessMsg": "Recovery Task Issued, Please Refresh Later",
|
||||
"Retry": "Retry",
|
||||
"ConnectAssets": "Connect",
|
||||
"Reviewer": "Approvers",
|
||||
"Role": "Role",
|
||||
"RoleCreate": "Create a role",
|
||||
|
|
|
@ -181,16 +181,6 @@ class UserSerializer(RolesSerializerMixin, ResourceLabelsMixin, CommonBulkModelS
|
|||
'mfa_level': {'label': _("MFA level")},
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.set_source_options()
|
||||
|
||||
def set_source_options(self):
|
||||
field = self.fields.get("source")
|
||||
if not field:
|
||||
return
|
||||
field.choices = User.get_source_choices()
|
||||
|
||||
def validate_password(self, password):
|
||||
password_strategy = self.initial_data.get("password_strategy")
|
||||
if self.instance is None and password_strategy != PasswordStrategy.custom:
|
||||
|
|
Loading…
Reference in New Issue