New: Require password confirmation when setting or changing password

(cherry picked from commit b248163df598dc611ee919d525eb7357256d73d5)

Closes #4315
This commit is contained in:
Mark McDowall 2023-11-18 18:51:23 -08:00 committed by Bogdan
parent 8c1ac91342
commit 1361492bf5
6 changed files with 58 additions and 7 deletions

View file

@ -34,7 +34,8 @@ function AuthenticationRequiredModalContent(props) {
authenticationMethod,
authenticationRequired,
username,
password
password,
passwordConfirmation
} = settings;
const authenticationEnabled = authenticationMethod && authenticationMethod.value !== 'none';
@ -120,6 +121,18 @@ function AuthenticationRequiredModalContent(props) {
{...password}
/>
</FormGroup>
<FormGroup>
<FormLabel>{translate('PasswordConfirmation')}</FormLabel>
<FormInputGroup
type={inputTypes.PASSWORD}
name="passwordConfirmation"
onChange={onInputChange}
helpTextWarning={passwordConfirmation?.value ? undefined : translate('AuthenticationRequiredPasswordConfirmationHelpTextWarning')}
{...passwordConfirmation}
/>
</FormGroup>
</div> :
null
}