Add LDAP E-mail Resolving
|Reported by:||rnieves||Owned by:||hasienda|
At our Trac site we have an OpenLDAP directory that serves as the central authentication point for workstations, SVN, and Trac. In it we have put all of our pertinent information, including a valid e-mail address.
After getting the AnnouncerPlugin working I wondered if I could extend it to include a "resolver" (as it is called in the plugin's parlance) that would look up user's e-mail address in the LDAP directory. I believe I was able to get at least a good start down that path. Attached to this ticket I have included a diff patch for the announcer/resolvers.py file which creates a new e-mail resolver: LdapEmailResolver.
The resolver carries with it several configuration options. All of the details of how to use these options is in the announcer/resolvers.py file.
I realize that all of this work will be overcome by events once IUserProvider is rolled out and the appropriate components are written against it. But, for now, this fit the bill just fine for me. I'm submitting it in the hope that it is useful to others.