Skip to content

Commit 22186b2

Browse files
committed
do not set AUTH_LDAP_MIRROR_GROUPS if not defined
1 parent 020e0ad commit 22186b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

configuration/ldap/ldap_config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ def _import_group_type(group_type_name):
7777

7878
# For more granular permissions, we can map LDAP groups to Django groups.
7979
AUTH_LDAP_FIND_GROUP_PERMS = environ.get('AUTH_LDAP_FIND_GROUP_PERMS', 'True').lower() == 'true'
80-
AUTH_LDAP_MIRROR_GROUPS = environ.get('AUTH_LDAP_MIRROR_GROUPS', '').lower() == 'true'
80+
if environ.get('AUTH_LDAP_MIRROR_GROUPS') is not None:
81+
AUTH_LDAP_MIRROR_GROUPS = environ.get('AUTH_LDAP_MIRROR_GROUPS', '').lower() == 'true'
8182

8283
# Cache groups for one hour to reduce LDAP traffic
8384
AUTH_LDAP_CACHE_TIMEOUT = int(environ.get('AUTH_LDAP_CACHE_TIMEOUT', 3600))

0 commit comments

Comments
 (0)