Opened 8 years ago
Closed 8 years ago
#1863 closed task (fixed)
Allow trac to notify yet-to-be-known OSGeo users
Reported by: | strk | Owned by: | strk |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | SysAdmin/Trac | Keywords: | trac |
Cc: |
Description
As of Trac-1.2 upgrade (#1816) notifications are only possible toward users who are *known* by the specific trac instance. To be known, a user must log in at least once, ending in the trac "session" table as "authenticated".
This ticket is to evaluate whether to instead always lookup OSGeo usernames even if they never logged in, which is what we had before the upgrade (see #39).
Upstream discussion about this is here: https://trac.edgewall.org/ticket/12658#comment:31 A simple/short patch is available here: https://git.osgeo.org/gogs/strk/trac/commit/a72b9176f11b93629b4c96c93f131545d1b0e7b1
Change History (3)
comment:1 by , 8 years ago
Component: | Systems Admin → Trac |
---|---|
Owner: | changed from | to
comment:2 by , 8 years ago
comment:3 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I've just upgraded trac to current tip of the 1.2-stable branch (r15513
) with the following patch applied:
commit 5b715da87632c56abfcc42379a99b4ddf7d5322f Author: Sandro Santilli <strk@kbt.io> Date: Tue Jan 17 10:57:26 2017 +0100 Allow resolving email of unknown users too (#12658) diff --git a/trac/notification/mail.py b/trac/notification/mail.py index 99cceec..e11f7f5 100644 --- a/trac/notification/mail.py +++ b/trac/notification/mail.py @@ -231,7 +231,7 @@ class RecipientMatcher(object): address = "%s@%s" % (address, self.smtp_default_domain) else: self.env.log.debug("Email address w/o domain: %s", address) - return None + return address, 0, None mo = self.shortaddr_re.search(address) if mo:
NOTE: at the time of writing, the patch above is committed in a fork of the Trac git repository hosted here: https://git.osgeo.org/gogs/strk/trac/src/t12658.strk
See also #128 for other things a LDAP aware "RecipientMatcher" could do.