From 5f77fbe75e4a0786d4b389ede40ddd0c839b50bd Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 30 Jul 2018 15:49:52 +0200 Subject: [PATCH] do not set a password on FranceConnect users (#25535) As user don't know this password they can never change it... --- src/authentic2_auth_fc/app_settings.py | 1 - tests/test_auth_fc.py | 3 --- 2 files changed, 4 deletions(-) diff --git a/src/authentic2_auth_fc/app_settings.py b/src/authentic2_auth_fc/app_settings.py index 8788de2..bd16a0e 100644 --- a/src/authentic2_auth_fc/app_settings.py +++ b/src/authentic2_auth_fc/app_settings.py @@ -70,7 +70,6 @@ class AppSettings(object): 'last_name': 'family_name', 'first_name': 'given_name', 'email': 'email', - 'password': {'compute': 'random', 'if-empty': True}, }) @property diff --git a/tests/test_auth_fc.py b/tests/test_auth_fc.py index 06ea033..fbb9429 100644 --- a/tests/test_auth_fc.py +++ b/tests/test_auth_fc.py @@ -109,9 +109,6 @@ def test_login(app, fc_settings, caplog, exp): # we must be connected assert app.session['_auth_user_id'] assert models.FcAccount.objects.count() == 1 - # by default we set a random password on new users, so they can use the - # recover my password form - assert User.objects.get().has_usable_password() response = app.get('/accounts/') response = response.click('Delete link') response.form.set('new_password1', 'ikKL1234')