[MM-33794] Improve password generation during bulk import (#17147)
Automatic Merge
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
2789be220b
Коммит
6a65b6ceca
@@ -337,8 +337,12 @@ func (a *App) importUser(data *UserImportData, dryRun bool) *model.AppError {
|
||||
password = *data.Password
|
||||
authData = nil
|
||||
} else {
|
||||
var err error
|
||||
// If no AuthData or Password is specified, we must generate a password.
|
||||
password = model.GeneratePassword(*a.Config().PasswordSettings.MinimumLength)
|
||||
password, err = generatePassword(*a.Config().PasswordSettings.MinimumLength)
|
||||
if err != nil {
|
||||
return model.NewAppError("importUser", "app.import.generate_password.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
authData = nil
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user