[users] Simplify config-logic for weak-passwords

- Use the convenience methods for config-reading.
 - Always set the value (to the default if nog explicitly
   set in the config-file).
This commit is contained in:
Adriaan de Groot 2019-10-21 17:29:35 +02:00
parent 21bcd560b1
commit ede50756a1

View File

@ -173,11 +173,7 @@ UsersViewStep::setConfigurationMap( const QVariantMap& configurationMap )
}
}
if ( configurationMap.contains( "allowWeakPasswords" )
&& configurationMap.value( "allowWeakPasswords" ).type() == QVariant::Bool )
{
m_widget->setPasswordCheckboxVisible( configurationMap.value( "allowWeakPasswords" ).toBool() );
}
m_widget->setPasswordCheckboxVisible( CalamaresUtils::getBool( configurationMap, "allowWeakPasswords", false ) );
if ( configurationMap.contains( "doPasswordChecks" )
&& configurationMap.value( "doPasswordChecks" ).type() == QVariant::Bool )