add session timeout

This commit is contained in:
nd 2021-03-08 15:03:14 +01:00
parent a60819b996
commit 08bc91dec4
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
2 changed files with 4 additions and 1 deletions

View file

@ -13,5 +13,6 @@ mailman:
signup: True
change_pw: True
ldap: False
session_timeout: 3600
archiver:
key: "{{ lookup('password', '/dev/null length=128') }}"

View file

@ -39,8 +39,8 @@ MIDDLEWARE = (
'postorius.middleware.PostoriusMiddleware',
{% if mailman.web.remote_user %}
'django.contrib.auth.middleware.PersistentRemoteUserMiddleware',
# 'django.contrib.auth.middleware.RemoteUserMiddleware',
{% endif %}
'django_auth_ldap_remoteuser.middleware.SessionTimeoutMiddleware',
)
# Application definition
@ -237,3 +237,5 @@ 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 }}
{% endif %}
SESSION_EXPIRE_SECONDS = {{ mailman.web.session_timeout }}