From ef7d62da8a0b421e9c04e09ed331775145e67038 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Fri, 30 Jun 2017 10:14:15 +0200 Subject: [PATCH] Fixed documentation. --- doc/upgrade.rst | 103 +++++++++++++++++++++++++++--------------------- 1 file changed, 58 insertions(+), 45 deletions(-) diff --git a/doc/upgrade.rst b/doc/upgrade.rst index 8c8510b1a..c66a30455 100644 --- a/doc/upgrade.rst +++ b/doc/upgrade.rst @@ -84,6 +84,64 @@ documentation. Specific instructions ********************* +1.8.0 +===== + +Modoboa now relies on `Django's builtin password validation system +`_ +to validate user passwords, instead of ``django-passwords``. + +Remove ``django-passwords`` from your system: + +.. sourcecode:: bash + + > sudo -u -i + > source /bin/activate + > pip uninstall django-passwords + +Edit the :file:`settings.py` file and remove the following content: + +.. sourcecode:: python + + # django-passwords + + PASSWORD_MIN_LENGTH = 8 + + PASSWORD_COMPLEXITY = { + "UPPER": 1, + "LOWER": 1, + "DIGITS": 1 + } + +Add the following lines: + +.. sourcecode:: python + + # Password validation rules + AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, + { + 'NAME': 'modoboa.core.password_validation.ComplexityValidator', + 'OPTIONS': { + 'upper': 1, + 'lower': 1, + 'digits': 1, + 'specials': 0 + } + }, + ] + 1.7.2 ===== @@ -167,51 +225,6 @@ Don't forget to run the following command: > python manage.py collectstatic -1.8.0 -===== - -Modoboa now relies on `Django's builtin password validation system -`_ -to validate user passwords, instead of ``django-passwords``. - -Remove ``django-passwords`` from your system: - -.. sourcecode:: bash - - > sudo -u -i - > source /bin/activate - > pip uninstall django-passwords - -Then, edit the :file:`settings.py` file and add the following content -inside:: - -.. sourcecode:: python - - # Password validation rules - - AUTH_PASSWORD_VALIDATORS = [ - { - 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', - }, - { - 'NAME': 'modoboa.core.password_validation.ComplexityValidator', - 'OPTIONS': { - 'upper': 1, - 'lower': 1, - 'digits': 1, - 'specials': 0 - } - }, - ] 1.7.1 =====