From 8e8e37fcc145fce6fa0a9402deeee690120bf7be Mon Sep 17 00:00:00 2001 From: Jens Rudolf <58146618+jensrudolf@users.noreply.github.com> Date: Mon, 23 Jun 2025 13:08:00 +0200 Subject: [PATCH] Add AUTH_LDAP_ALWAY_UPDATE_USER to ldap config This change exposes the Django setting AUTH_LDAP_ALWAYS_UPDATE_USER as environment variable to simplify deployments with readonly databases and LDAP based authentication as no extra file is required to be mounted into the container anymore. --- configuration/ldap/ldap_config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configuration/ldap/ldap_config.py b/configuration/ldap/ldap_config.py index 82fad72..59e6aea 100644 --- a/configuration/ldap/ldap_config.py +++ b/configuration/ldap/ldap_config.py @@ -109,3 +109,6 @@ AUTH_LDAP_USER_ATTR_MAP = { "last_name": environ.get('AUTH_LDAP_ATTR_LASTNAME', 'sn'), "email": environ.get('AUTH_LDAP_ATTR_MAIL', 'mail') } + +# Update user object with the latest values from the LDAP directory every time the user logs in. +AUTH_LDAP_ALWAYS_UPDATE_USER = environ.get('AUTH_LDAP_ALWAYS_UPDATE_USER', 'True').lower() == 'true'