[MM-15490] Rework default password requirements (#10844)
* Rework default password requirements * Update API Test Lib Default User PW * Remove unused function; Disable password reqs in dev mode * Disable strict password requirements for unit tests * Update unit tests
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
0b6acaa9ba
Коммит
d269891476
@@ -10,14 +10,6 @@ import (
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
func IsPasswordValid(password string) *model.AppError {
|
||||
if len(password) > model.PASSWORD_MAXIMUM_LENGTH || len(password) < model.PASSWORD_MINIMUM_LENGTH {
|
||||
return model.NewAppError("User.IsValid", "model.user.is_valid.pwd.app_error", map[string]interface{}{"Min": model.PASSWORD_MINIMUM_LENGTH}, "", http.StatusBadRequest)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func IsPasswordValidWithSettings(password string, settings *model.PasswordSettings) *model.AppError {
|
||||
id := "model.user.is_valid.pwd"
|
||||
isError := false
|
||||
|
||||
Ссылка в новой задаче
Block a user