Opened 10 years ago
SCOPE_ONELEVEL vs SCOPE_SUBTREE
|Reported by:||anonymous||Owned by:||Emmanuel Blot|
I'm using ldapplugin-0.5.1dev_r1611 and have found that anonymous users are unable to browser and I cannot login with my admin ID. Looking into this further I've discovered that I can manually search my ldap tree for the uid=anonymous (for example) but using a scope = SCOPE_SUBTREE. However, when trac searches for this uid it's using a scope = SCOPE_ONELEVEL. I applied the following patch to get this working. Is this the correct to fix this or is there a parameter that can be used in trac.ini to modify the search depth?
--- api.py 2006-12-10 11:39:17.000000000 -0500 +++ api_20061220.py 2006-12-20 12:27:46.000000000 -0500 @@ -640,7 +640,7 @@ raise TracError("Unable to open LDAP cnx: %s" % e['desc']) def _search(self, basedn, filterstr='(objectclass=*)', attributes=None, - scope=ldap.SCOPE_ONELEVEL): + scope=ldap.SCOPE_SUBTREE): """Search the LDAP directory""" try: if not self.__dict__.has_key('_ds') or not self.__dict__['_ds']: