Skip to content

Commit 8e8e37f

Browse files
authored
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.
1 parent 17a5ddc commit 8e8e37f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

configuration/ldap/ldap_config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,6 @@ def _import_group_type(group_type_name):
109109
"last_name": environ.get('AUTH_LDAP_ATTR_LASTNAME', 'sn'),
110110
"email": environ.get('AUTH_LDAP_ATTR_MAIL', 'mail')
111111
}
112+
113+
# Update user object with the latest values from the LDAP directory every time the user logs in.
114+
AUTH_LDAP_ALWAYS_UPDATE_USER = environ.get('AUTH_LDAP_ALWAYS_UPDATE_USER', 'True').lower() == 'true'

0 commit comments

Comments
 (0)