Changeset 484


Ignore:
Timestamp:
10/06/10 14:07:19 (10 years ago)
Author:
bas
Message:

Applied a patch to detect valid users if smtp_default_domain is set, see #219

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r482 r484  
    22   * An email adress can match multiple trac accounts, closes #218
    33     Author: Konstantin Ryabitsev <icon add mricon dot com>
    4  
     4
     5   * Added check to detect valid users when smtp_default_domain in
     6     trac.ini is set, closes #219
     7     Author: sto add iti dot upv dot es
     8     Applied by: Bas van der Vlies with some minor changes
     9
    5101.6.0 (2010-8-10)
    611   * Fixed an Unicode error in strip_quotes
  • trunk/email2trac.py.in

    r483 r484  
    221221
    222222                self.trac_smtp_from = self.get_config('notification', 'smtp_from')
     223                self.smtp_default_domain = self.get_config('notification', 'smtp_default_domain')
     224
    223225
    224226                self.system = None
     
    338340                #
    339341                users = [ (u,n,e) for (u, n, e) in self.env.get_known_users(self.db)
    340                         if e and (e.lower() == self.email_addr.lower()) ]
     342                        if (
     343                                (e and (e.lower() == self.email_addr.lower())) or
     344                            (u + '@' + self.smtp_default_domain.lower() == self.email_addr.lower())
     345                        )
     346                        ]
    341347
    342348                if len(users) >= 1:
Note: See TracChangeset for help on using the changeset viewer.