Edgewall Software
Modify

Opened 19 years ago

Last modified 3 months ago

#3162 new enhancement

LDAP support for e-mail notification

Reported by: remco.wouts@… Owned by:
Priority: normal Milestone: next-major-releases
Component: notification Version: 0.9.5
Severity: normal Keywords: ldap
Cc: tolsen@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When using trac with LDAP authorization it would be nice if LDAP is also used for getting the e-mail address of logged in users (this feature should probably be settable using some trac.ini parameters).

I do not know howto read trac.ini parameters so I added a few lines to Notify.py Maybe somebody can use this.

Attachments (1)

foo (1.1 KB ) - added by remco <remco.wouts@…> 19 years ago.
Notify.py example to get LDAP support

Download all attachments as: .zip

Change History (22)

by remco <remco.wouts@…>, 19 years ago

Attachment: foo added

Notify.py example to get LDAP support

comment:1 by Emmanuel Blot, 19 years ago

Owner: changed from Jonas Borgström to Emmanuel Blot
Status: newassigned

This will be implemented in the h:wiki:LdapPlugin when the IUserDirectory interface is implemented in Trac core.

comment:2 by Emmanuel Blot, 19 years ago

Keywords: notification email ldap added

comment:3 by sid, 18 years ago

See #2456 for the !IUserDirectory work.

comment:4 by Christian Boos, 18 years ago

Btw, you could check the latest patch from Waldemar on #2456 to see if that would meet the requirements for this ticket…

comment:5 by Emmanuel Blot, 18 years ago

Component: generalnotification
Keywords: notification email removed

comment:6 by Christian Boos, 18 years ago

Milestone: 0.12

(coupling with #2456)

comment:7 by tolsen@…, 16 years ago

Cc: tolsen@… added

comment:8 by rdeman, 11 years ago

Guys what's the status? Last update 5 years ago. Ticket still not closed. Anybody knows?

comment:9 by anonymous, 11 years ago

This feature is useful…

Anyone knows how to enable it in version 0.12.5? Which plugins?

comment:10 by Ryan J Ollos, 10 years ago

Owner: Emmanuel Blot removed
Status: assignednew

comment:11 by anonymous, 8 years ago

We're still using a custom modification of the notify code to do this, any new way to do it in Trac 1.2 ?

comment:13 by strk@…, 8 years ago

I did install a plugin based on the given example, and added email_address_resolvers = LdapEmailAddressResolver under the [notification] section of trac.ini, but I do not see any trace of the plugin's get_address_for_session method being called (I have self.log.info("XXX") line in - what am I doing wrong ?

comment:14 by strk@…, 8 years ago

As I continue to try at debugging the problem, I've added debug lines in the EmailDistributor class (notification/mail.py) — there I can see the class __init__ and transports being called but never see the distribute function called. The log show INFO: Email address w/ou domain: xxx a few times (once per partecipating user in a ticket) before logging the __init__ and transports hits.

Why is it that distribute isn't called ?

Following the code, the NotificationSystem.distribute_event is called witn an empty list as the subscriptions parameter. What determines that? Shouldn't the ticket owner and people in Cc be always subscribed to ticket update events ?

Last edited 8 years ago by Jun Omae (previous) (diff)

comment:15 by anonymous, 8 years ago

Setting an email in the user's session preferences makes the subscription non-empty, but the whole point of my customization was to automatically figure out emails from usernames, w/out requiring the specification of an email in session preferences

comment:16 by strk@…, 8 years ago

Setting use_short_addr = enabled fixes the Email address user w/o domain warning *and* the empty subscription, moving on now

comment:17 by anonymous, 8 years ago

I would note that use_short_addr = enabled is discouraged by docs so maybe it's not a good idea to use. Shouldn't the EmailResolver kick-in before getting there ? Or when is it supposed to resolve ?

comment:18 by Ryan J Ollos, 8 years ago

Please try to keep discussion about plugin development on the MailingList.

comment:19 by anonymous, 8 years ago

Moved here (not sure if it's the correct place): https://groups.google.com/forum/#!topic/trac-users/xVLMcnIO20c

comment:20 by anonymous, 8 years ago

The problem I was having with the custom LDAP EmailResolver plugin is fixed by applying the patch in #12658

comment:21 by anonymous, 3 months ago

For the record, we rolled our own plugin for this: https://git.osgeo.org/gitea/sac/TracLDAPEmailResolverPlugin

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.