Merge branch 'master' of adellam/mailman into master

This commit is contained in:
Andrea Dell'Amico 2020-02-17 12:38:16 +01:00 committed by Gitea
commit 8ead854bfe
2 changed files with 21 additions and 14 deletions

View File

@ -13,10 +13,22 @@ mailman_site_owner: 'mailman@example.com'
mailman_from_email: 'mailman@example.com'
mailman_server_email: 'mailman@example.com'
mailman_noreply_addr: 'noreply'
mailman_use_social_account_providers: False
mailman_use_memcache: False
mailman_memcache_hosts: '127.0.0.1:11211'
mailman_site_url: 'http://localhost'
# Documentation that must be followed to configure the social auth providers
# https://django-allauth.readthedocs.io/en/latest/installation.html
mailman_use_social_account_providers: False
mailman_postorious_social_auth_providers:
- 'django_mailman3.lib.auth.fedora'
- 'allauth.socialaccount.providers.openid'
- 'allauth.socialaccount.providers.github'
- 'allauth.socialaccount.providers.gitlab'
- 'allauth.socialaccount.providers.google'
- 'allauth.socialaccount.providers.facebook'
- 'allauth.socialaccount.providers.twitter'
- 'allauth.socialaccount.providers.stackexchange'
mailman_admins:
- "'Mailman Suite Admin', 'mailman@example.com'"

View File

@ -83,15 +83,13 @@ INSTALLED_APPS = (
'django_q',
'allauth',
'allauth.account',
'allauth.socialaccount',
'django_mailman3.lib.auth.fedora',
'allauth.socialaccount.providers.openid',
'allauth.socialaccount.providers.github',
'allauth.socialaccount.providers.gitlab',
'allauth.socialaccount.providers.google',
# 'allauth.socialaccount.providers.facebook',
'allauth.socialaccount.providers.twitter',
'allauth.socialaccount.providers.stackexchange',
'allauth.socialaccount'
{% if mailman_use_social_account_providers %}
{% for auth_provider in mailman_postorious_social_auth_providers %}
'{{ auth_privider }}',
{% endfor %}
{% endif %}
)
@ -295,12 +293,12 @@ ACCOUNT_EMAIL_VERIFICATION = "mandatory"
ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
ACCOUNT_UNIQUE_EMAIL = True
{% if mailman_use_social_account_providers %}
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend',
)
{% if mailman_use_social_account_providers %}
SOCIALACCOUNT_PROVIDERS = {
'openid': {
'SERVERS': [
@ -328,9 +326,6 @@ SOCIALACCOUNT_PROVIDERS = {
},
}
{% else %}
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
)
SOCIALACCOUNT_PROVIDERS = { }
{% endif %}