From ed15edabf9be0b1a68c9521068c31ebfc8578322 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 23 May 2018 03:30:51 -0400 Subject: [PATCH] [users] Document passwordRequirements and code --- src/modules/users/UsersPage.h | 6 ++++++ src/modules/users/users.conf | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/users/UsersPage.h b/src/modules/users/UsersPage.h index 5990d8693..817f73d0b 100644 --- a/src/modules/users/UsersPage.h +++ b/src/modules/users/UsersPage.h @@ -52,6 +52,12 @@ public: void setAutologinDefault( bool checked ); void setReusePasswordDefault( bool checked ); + /** @brief Process entries in the passwordRequirements config entry + * + * Called once for each item in the config entry, which should + * be a key-value pair. What makes sense as a value depends on + * the key. Supported keys are documented in users.conf. + */ void addPasswordCheck( const QString& key, const QVariant& value ); protected slots: diff --git a/src/modules/users/users.conf b/src/modules/users/users.conf index 6111a6e80..be0221c8b 100644 --- a/src/modules/users/users.conf +++ b/src/modules/users/users.conf @@ -72,5 +72,5 @@ passwordRequirements: minLength: -1 # Password at least this many characters maxLength: -1 # Password at most this many characters libpwquality: - - minlen=8 - - minclass=2 + - minlen=0 + - minclass=0