From 1a3a1de274a428d580f9137e2a0b66db5001c566 Mon Sep 17 00:00:00 2001 From: Julian Rother Date: Fri, 8 Apr 2022 02:51:55 +0200 Subject: [PATCH] Adapt role to changes in postorius-ldap-membership-management Closes https://git.cccv.de/infra/documentation/-/issues/157 --- tasks/main.yml | 3 +-- templates/mailman-web.py.j2 | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index aeeda04..db3f6b8 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -13,7 +13,6 @@ - name: install mailman addons via pip notify: restart mailman loop: - - git+https://git.cccv.de/uffd/django-auth-ldap-remoteuser.git - git+https://git.cccv.de/uffd/postorius-ldap-membership-management.git pip: executable: pip3 @@ -67,5 +66,5 @@ cron: name: "mailman ldap sync" user: www-data - job: /usr/bin/django-admin syncldap --pythonpath /usr/share/mailman3-web --settings settings; /usr/bin/django-admin syncldapmemberships --pythonpath /usr/share/mailman3-web --settings settings + job: /usr/bin/django-admin syncldapusers --pythonpath /usr/share/mailman3-web --settings settings; /usr/bin/django-admin syncldapmemberships --pythonpath /usr/share/mailman3-web --settings settings minute: "*/15" diff --git a/templates/mailman-web.py.j2 b/templates/mailman-web.py.j2 index 0f1b43e..e0eb2d3 100644 --- a/templates/mailman-web.py.j2 +++ b/templates/mailman-web.py.j2 @@ -40,7 +40,7 @@ MIDDLEWARE = ( {% if mailman.web.remote_user %} 'django.contrib.auth.middleware.PersistentRemoteUserMiddleware', {% endif %} - 'django_auth_ldap_remoteuser.middleware.SessionTimeoutMiddleware', + 'postorius_ldap_membership_management.middleware.SessionTimeoutMiddleware', ) # Application definition @@ -66,9 +66,6 @@ INSTALLED_APPS = ( 'allauth', 'allauth.account', 'allauth.socialaccount', -{% if mailman.web.remote_user and mailman.web.ldap %} - 'django_auth_ldap_remoteuser', -{% endif %} {% if mailman.web.ldap %} 'postorius_ldap_membership_management', {% endif %} @@ -76,7 +73,7 @@ INSTALLED_APPS = ( AUTHENTICATION_BACKENDS = ( {% if mailman.web.remote_user and mailman.web.ldap %} - 'django_auth_ldap_remoteuser.backends.LdapRemoteUserBackend', + 'postorius_ldap_membership_management.backends.LdapRemoteUserBackend', {% else %} {% if mailman.web.remote_user %} 'django.contrib.auth.backends.RemoteUserBackend',