Browse Source

[useradmin] Fix Sentry issue for mixed-case LDAP groups

Christopher Conner 10 years ago
parent
commit
0173c3ce4b
1 changed files with 5 additions and 1 deletions
  1. 5 1
      apps/useradmin/src/useradmin/ldap_access.py

+ 5 - 1
apps/useradmin/src/useradmin/ldap_access.py

@@ -211,9 +211,13 @@ class LdapConnection(object):
             LOG.warn('Could not find %s in ldap attributes' % group_name_attr)
             continue
 
+          group_name = data[group_name_attr][0]
+          if desktop.conf.LDAP.FORCE_USERNAME_LOWERCASE.get():
+            group_name = group_name.lower()
+
           ldap_info = {
             'dn': dn,
-            'name': data[group_name_attr][0]
+            'name': group_name
           }
 
           if group_member_attr in data and 'posixGroup' not in data['objectClass']: