[users] Massage the weak-passwords settings

- since the wording of the checkbox itself (and the functionality)
   is to enforce strong passwords, need to switch out some
   logic and fix the wording of the documentation.
main
Adriaan de Groot 5 years ago
parent 3e4e492305
commit b3765bc144

@ -174,12 +174,7 @@ UsersViewStep::setConfigurationMap( const QVariantMap& configurationMap )
}
m_widget->setPasswordCheckboxVisible( CalamaresUtils::getBool( configurationMap, "allowWeakPasswords", false ) );
if ( configurationMap.contains( "doPasswordChecks" )
&& configurationMap.value( "doPasswordChecks" ).type() == QVariant::Bool )
{
m_widget->setValidatePasswordDefault( configurationMap.value( "doPasswordChecks" ).toBool() );
}
m_widget->setValidatePasswordDefault( !CalamaresUtils::getBool( configurationMap, "allowWeakPasswordsDefault", false) );
QString shell( QLatin1String( "/bin/bash" ) ); // as if it's not set at all
if ( configurationMap.contains( "userShell" ) )

@ -81,7 +81,7 @@ doReusePassword: true
# comment out the relevant 'passwordRequirements' keys below.
# - To disable all password validations:
# set both 'allowWeakPasswords' and 'allowWeakPasswordsDefault' to true.
# (This will show the box *Allow weak passwords* in the user-
# (That will show the box *Allow weak passwords* in the user-
# interface, and check it by default).
passwordRequirements:
minLength: -1 # Password at least this many characters
@ -90,19 +90,22 @@ passwordRequirements:
- minlen=0
- minclass=0
# You can control the visibility of the 'weak passwords' checkbox here.
# You can control the visibility of the 'strong passwords' checkbox here.
# Possible values are:
# - true to show or
# - false to hide
# - false to hide (default)
# the checkbox. This checkbox allows the user to choose to disable
# password-strength-checks.
allowWeakPasswords: true
# You can control the initial state for the 'weak passwords' checkbox here.
# password-strength-checks. By default the box is **hidden**, so
# that you have to pick a password that satisfies the checks.
allowWeakPasswords: false
# You can control the initial state for the 'strong passwords' checkbox here.
# Possible values are:
# - true to check or
# - false to uncheck
# the checkbox by default.
doPasswordChecks: true
# - true to uncheck or
# - false to check (default)
# the checkbox by default. Since the box is labeled to enforce strong
# passwords, in order to **allow** weak ones by default, the box needs
# to be unchecked.
allowWeakPasswordsDefault: false
# Shell to be used for the regular user of the target system.
# There are three possible kinds of settings:

Loading…
Cancel
Save