Merge branch 'master' of adellam/mailman into master
This commit is contained in:
commit
8ead854bfe
|
@ -13,10 +13,22 @@ mailman_site_owner: 'mailman@example.com'
|
||||||
mailman_from_email: 'mailman@example.com'
|
mailman_from_email: 'mailman@example.com'
|
||||||
mailman_server_email: 'mailman@example.com'
|
mailman_server_email: 'mailman@example.com'
|
||||||
mailman_noreply_addr: 'noreply'
|
mailman_noreply_addr: 'noreply'
|
||||||
mailman_use_social_account_providers: False
|
|
||||||
mailman_use_memcache: False
|
mailman_use_memcache: False
|
||||||
mailman_memcache_hosts: '127.0.0.1:11211'
|
mailman_memcache_hosts: '127.0.0.1:11211'
|
||||||
mailman_site_url: 'http://localhost'
|
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_admins:
|
||||||
- "'Mailman Suite Admin', 'mailman@example.com'"
|
- "'Mailman Suite Admin', 'mailman@example.com'"
|
||||||
|
|
|
@ -83,15 +83,13 @@ INSTALLED_APPS = (
|
||||||
'django_q',
|
'django_q',
|
||||||
'allauth',
|
'allauth',
|
||||||
'allauth.account',
|
'allauth.account',
|
||||||
'allauth.socialaccount',
|
'allauth.socialaccount'
|
||||||
'django_mailman3.lib.auth.fedora',
|
{% if mailman_use_social_account_providers %}
|
||||||
'allauth.socialaccount.providers.openid',
|
{% for auth_provider in mailman_postorious_social_auth_providers %}
|
||||||
'allauth.socialaccount.providers.github',
|
'{{ auth_privider }}',
|
||||||
'allauth.socialaccount.providers.gitlab',
|
{% endfor %}
|
||||||
'allauth.socialaccount.providers.google',
|
{% endif %}
|
||||||
# 'allauth.socialaccount.providers.facebook',
|
|
||||||
'allauth.socialaccount.providers.twitter',
|
|
||||||
'allauth.socialaccount.providers.stackexchange',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -295,12 +293,12 @@ ACCOUNT_EMAIL_VERIFICATION = "mandatory"
|
||||||
ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
|
ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
|
||||||
ACCOUNT_UNIQUE_EMAIL = True
|
ACCOUNT_UNIQUE_EMAIL = True
|
||||||
|
|
||||||
{% if mailman_use_social_account_providers %}
|
|
||||||
AUTHENTICATION_BACKENDS = (
|
AUTHENTICATION_BACKENDS = (
|
||||||
'django.contrib.auth.backends.ModelBackend',
|
'django.contrib.auth.backends.ModelBackend',
|
||||||
'allauth.account.auth_backends.AuthenticationBackend',
|
'allauth.account.auth_backends.AuthenticationBackend',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
{% if mailman_use_social_account_providers %}
|
||||||
SOCIALACCOUNT_PROVIDERS = {
|
SOCIALACCOUNT_PROVIDERS = {
|
||||||
'openid': {
|
'openid': {
|
||||||
'SERVERS': [
|
'SERVERS': [
|
||||||
|
@ -328,9 +326,6 @@ SOCIALACCOUNT_PROVIDERS = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
{% else %}
|
{% else %}
|
||||||
AUTHENTICATION_BACKENDS = (
|
|
||||||
'django.contrib.auth.backends.ModelBackend',
|
|
||||||
)
|
|
||||||
|
|
||||||
SOCIALACCOUNT_PROVIDERS = { }
|
SOCIALACCOUNT_PROVIDERS = { }
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue