Opened 10 years ago
Last modified 4 years ago
#11411 new enhancement
Add LDAP E-mail Resolving
Reported by: | Rolando Nieves | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | AnnouncerPlugin |
Severity: | normal | Keywords: | ldap |
Cc: | Trac Release: | 1.0 |
Description
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.
Attachments (2)
Change History (13)
Changed 10 years ago by
Attachment: | announcerplugin_ldappatch.diff added |
---|
comment:1 Changed 10 years ago by
Cc: | Ryan J Ollos added; anonymous removed |
---|
Thank you for your valuable contribution.
I'd appreciate at least on independent test of the patch, because I've no suitable environment. By chance: Is it possible (for you) to contribute some unit tests for the new component and its methods too? I ask this in recognition of my nearly total absence of experience with LDAP.
comment:2 Changed 10 years ago by
I'd like to add to this ticket that I have used this patch and it worked once i figured out the necessary configuration variables. Good work and thank you! Please apply this patch to the Announcer plugin as i can confirm it works. (and please add a tiny example config for ldap section)
comment:3 Changed 10 years ago by
#11559, that recommends a rename of configuration options, has been closed as a duplicate of this ticket.
comment:4 Changed 10 years ago by
#11936 has been closed as a duplicate for asking about the enhancement suggested here.
comment:5 follow-up: 7 Changed 10 years ago by
This is not working for me on trac 1.01. for trac 0.12 i created a plugin. any suggestions to get this working for trac 1.01?
comment:6 Changed 10 years ago by
Please use the unified diff format for patches, as described in trac:TracDev/SubmittingPatches.
comment:7 Changed 10 years ago by
Replying to shorif2000:
This is not working for me on trac 1.01. for trac 0.12 i created a plugin. any suggestions to get this working for trac 1.01?
Wait a moment. You're a bit too fast for me. You claim (plugin) "not working with Trac 1.0.1", but in next sentence you switch to Trac 0.12 and show a Python2.4 issue to us in SO question(s).
Your configuration is a bit fuzzy too. You should disregard any setting in [notification] while using announcer.
comment:8 Changed 10 years ago by
I used your patch for trac 1.01. However I could not get it to work. Can you give some instructions?
comment:9 Changed 9 years ago by
Thank you for the patch, it works great. I had to change ldap.SCOPE_ONELEVEL by ldap.SCOPE_SUBTREE in directory.search_s function with my LDAP though. It may be a good idea to make it configurable ?
comment:10 Changed 7 years ago by
Owner: | Steffen Hoffmann deleted |
---|
comment:11 Changed 4 years ago by
Cc: | Ryan J Ollos removed |
---|
LDAP e-mail resolver patch