pref: remove user source choice

pull/13145/head
ibuler 2024-04-28 16:01:09 +08:00
parent 7d64b8419f
commit 8aa707427f
2 changed files with 1 additions and 10 deletions

View File

@ -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",

View File

@ -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: