MM-25762 - Moved password settings to client limited configuration (#14777)

* Moved password settings to limited configuration

* Added unit test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Maria A Nunez
2020-06-18 06:14:03 -04:00
коммит произвёл GitHub
родитель 8dc7c5762f
Коммит 085ab2c60a
2 изменённых файлов: 27 добавлений и 10 удалений

Просмотреть файл

@@ -236,6 +236,27 @@ func TestGetLimitedClientConfig(t *testing.T) {
"WebsocketSecurePort": "443",
},
},
{
"password settings",
&model.Config{
PasswordSettings: model.PasswordSettings{
MinimumLength: iToP(15),
Lowercase: bToP(true),
Uppercase: bToP(true),
Number: bToP(true),
Symbol: bToP(false),
},
},
"",
nil,
map[string]string{
"PasswordMinimumLength": "15",
"PasswordRequireLowercase": "true",
"PasswordRequireUppercase": "true",
"PasswordRequireNumber": "true",
"PasswordRequireSymbol": "false",
},
},
}
for _, testCase := range testCases {