added support to sync memberships from ldap

This commit is contained in:
nd 2021-03-09 18:30:52 +01:00
parent 2c64104b60
commit d077b94e92
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
5 changed files with 55 additions and 16 deletions

View file

@ -69,6 +69,9 @@ INSTALLED_APPS = (
{% if mailman.web.remote_user and mailman.web.ldap %}
'django_auth_ldap_remoteuser',
{% endif %}
{% if mailman.web.ldap %}
'postorius_ldap_membership_management',
{% endif %}
)
AUTHENTICATION_BACKENDS = (
@ -223,7 +226,7 @@ AUTH_LDAP_CONNECTION_OPTIONS = {{ mailman.web.ldap.options|d('{}') }}
AUTH_LDAP_USER_DN_TEMPLATE = "{{ mailman.web.ldap.user_filter|d('') }}"
AUTH_LDAP_USER_SEARCH = {{ mailman.web.ldap.user_search|d('None') }}
AUTH_LDAP_USER_SEARCH_ALL_NAME = {{ mailman.web.ldap.user_search_all_name|d('None') }}
AUTH_LDAP_USER_ATTR_MAP = {"first_name": "givenName", "last_name": "sn", "email": "mail"}
AUTH_LDAP_USER_ATTR_MAP = {"first_name": "cn", "email": "mail"}
AUTH_LDAP_GROUP_SEARCH = {{ mailman.web.ldap.group_search|d('') }}
AUTH_LDAP_GROUP_TYPE = {{ mailman.web.ldap.group_type|d('') }}
@ -236,8 +239,14 @@ AUTH_LDAP_FIND_GROUP_PERMS = True
AUTH_LDAP_REQUIRE_GROUP = "{{ mailman.web.ldap.group_require|d('') }}"
AUTH_LDAP_DENY_GROUP = "{{ mailman.web.ldap.group_require|d('') }}"
AUTH_LDAP_USER_FLAGS_BY_GROUP = {{ mailman.web.ldap.mappings|d({})|to_json }}
null = None
true = True
false = False
LDAP_MEMBERSHIP_SYNC = {{ mailman.lists|expand_dict_keys_with_defaults(mailman.list_defaults)|to_json }}
{% endif %}
SESSION_EXPIRE_SECONDS = {{ mailman.web.session_timeout }}
HYPERKITTY_ENABLE_GRAVATAR = False
HYPERKITTY_ALLOW_WEB_POSTING = False