You are here: Home / Documentation / How To's / NetID handles groups differently, causes error

NetID handles groups differently, causes error

by nguyen — published Sep 13, 2012 02:34 PM, last modified Aug 16, 2016 10:50 AM
when you try to use the Site Setup -> Users and Groups -> Groups tab

If you get an error stack that ends in:

  Module Products.LDAPMultiPlugins.LDAPMultiPlugin, line 285, in enumerateGroups
  Module Products.LDAPUserFolder.LDAPUserFolder, line 1093, in searchGroups
IndexError: list index out of range

try applying this patch to your Products/LDAPUserFolder/LDAPUserFolder.py file:

--- LDAPUserFolder.py   2012/08/30 15:48:14     1.1                                                                                                           
+++ LDAPUserFolder.py   2012/08/30 17:29:00     1.2                                                                                                           
@@ -6,7 +6,7 @@
 # LICENSE.txt for the terms of this license.                                                                                                                 
 #                                                                                                                                                            
 #####################################################################                                                                                        
-__version__='$Revision: 1.1 $'[11:-2]                                                                                                                        
+__version__='$Revision: 1.2 $'[11:-2]                                                                                                                        
                                                                                                                                                              
 # General python imports                                                                                                                                     
 import logging                                                                                                                                               
@@ -1090,7 +1090,10 @@
                 rec_dict = {}                                                                                                                                
                                                                                                                                                              
                 for key, val in res_dicts[i].items():                                                                                                        
-                    rec_dict[key] = val[0]                                                                                                                   
+                    if len(val) > 0:                                                                                                                         
+                        rec_dict[key] = val[0]                                                                                                               
+                    else:                                                                                                                                    
+                        logger.warn("empty val for key '%s', dn '%s'" % (key, dn))                                                                           
                                                                                                                                                              
                 rec_dict['dn'] = dn
 

 

Navigation