From fa103c8451876c281b9347750737dc61cefc5134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Thu, 28 Jan 2016 10:05:08 +0000 Subject: [PATCH] Mailman: don't use the email as username, the field is too short --- roles/mailman/templates/settings.py.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/mailman/templates/settings.py.j2 b/roles/mailman/templates/settings.py.j2 index ec72a02dc6..e5e84b1882 100644 --- a/roles/mailman/templates/settings.py.j2 +++ b/roles/mailman/templates/settings.py.j2 @@ -202,7 +202,9 @@ LOGIN_URL = 'hk_user_login' LOGOUT_URL = 'hk_user_logout' LOGIN_REDIRECT_URL = 'hk_root' -BROWSERID_USERNAME_ALGO = lambda email: email # Use the email as identifier +# Use the email as identifier, but truncate it because the User.username field +# is only 30 chars long. +BROWSERID_USERNAME_ALGO = lambda email: email[:30] BROWSERID_VERIFY_CLASS = "django_browserid.views.Verify" @@ -231,8 +233,6 @@ if django.VERSION[:2] < (1, 7): 'default': 'social.apps.django_app.default.south_migrations' } -SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL = True - # http://python-social-auth.readthedocs.org/en/latest/pipeline.html#authentication-pipeline SOCIAL_AUTH_PIPELINE = ( 'social.pipeline.social_auth.social_details',