Added getStateFromConfig (#3517)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
df33348704
Коммит
f2b1401680
@@ -80,6 +80,19 @@ export default class PasswordSettings extends AdminSettings {
|
|||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getStateFromConfig(config) {
|
||||||
|
return {
|
||||||
|
passwordMinimumLength: config.PasswordSettings.MinimumLength,
|
||||||
|
passwordLowercase: config.PasswordSettings.Lowercase,
|
||||||
|
passwordNumber: config.PasswordSettings.Number,
|
||||||
|
passwordUppercase: config.PasswordSettings.Uppercase,
|
||||||
|
passwordSymbol: config.PasswordSettings.Symbol,
|
||||||
|
maximumLoginAttempts: config.ServiceSettings.MaximumLoginAttempts,
|
||||||
|
enableMultifactorAuthentication: config.ServiceSettings.EnableMultifactorAuthentication,
|
||||||
|
passwordResetSalt: config.EmailSettings.PasswordResetSalt
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
getSampleErrorMsg() {
|
getSampleErrorMsg() {
|
||||||
if (this.props.config.PasswordSettings.MinimumLength > Constants.MAX_PASSWORD_LENGTH || this.props.config.PasswordSettings.MinimumLength < Constants.MIN_PASSWORD_LENGTH) {
|
if (this.props.config.PasswordSettings.MinimumLength > Constants.MAX_PASSWORD_LENGTH || this.props.config.PasswordSettings.MinimumLength < Constants.MIN_PASSWORD_LENGTH) {
|
||||||
return (
|
return (
|
||||||
@@ -161,6 +174,7 @@ export default class PasswordSettings extends AdminSettings {
|
|||||||
defaultMessage='Minimum Password Length:'
|
defaultMessage='Minimum Password Length:'
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
placeholder={Utils.localizeMessage('admin.password.minimumLengthExample', 'Ex "5"')}
|
||||||
helpText={
|
helpText={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='admin.password.minimumLengthDescription'
|
id='admin.password.minimumLengthDescription'
|
||||||
|
|||||||
@@ -410,6 +410,7 @@
|
|||||||
"admin.password.lowercase": "At least one lowercase letter",
|
"admin.password.lowercase": "At least one lowercase letter",
|
||||||
"admin.password.minimumLength": "Minimum Password Length:",
|
"admin.password.minimumLength": "Minimum Password Length:",
|
||||||
"admin.password.minimumLengthDescription": "Minimum number of characters required for a valid password. Must be a whole number greater than or equal to {min} and less than or equal to {max}.",
|
"admin.password.minimumLengthDescription": "Minimum number of characters required for a valid password. Must be a whole number greater than or equal to {min} and less than or equal to {max}.",
|
||||||
|
"admin.password.minimumLengthExample": "Ex \"5\"",
|
||||||
"admin.password.number": "At least one number",
|
"admin.password.number": "At least one number",
|
||||||
"admin.password.preview": "Error message preview",
|
"admin.password.preview": "Error message preview",
|
||||||
"admin.password.requirements": "Password Requirements:",
|
"admin.password.requirements": "Password Requirements:",
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user