Ticket #10171 (closed defect: fixed)

Opened 10 months ago

Last modified 10 months ago

CC parsing should use NotifyEmail.addrsep_re.split(ticket['cc'])

Reported by: mitar Assigned to: dkgdkg
Priority: normal Component: SensitiveTicketsPlugin
Severity: normal Keywords:
Cc: mmitar@gmail.com Trac Release: 0.12

Description (Last modified by rjollos)

CC parsing should use NotifyEmail.addrsep_re.split(ticket['cc']) as this is what it is used by Trac:

from trac.notification import NotifyEmail

...

        if not username or username == 'anonymous':
            return False
        return (self.allow_owner and (ticket['owner'] == username)) or \
            (self.allow_reporter and (ticket['reporter'] == username)) or \
            (self.allow_cc and username in NotifyEmail.addrsep_re.split(ticket['cc']))

Attachments

Change History

08/06/12 02:30:06 changed by dkgdkg

  • status changed from new to closed.
  • resolution set to fixed.

(In [11906]) use NotifyEmail?.addrsep_re to parse cc field (Closes #10171)

08/06/12 22:00:32 changed by rjollos

Has this been tested? It seems that from trac.notification import NotifyEmail is missing.

There's also the Chrome.cc_list function, which is more directly intended for what you are trying to accomplish, I think.

from trac.web.chrome import Chrome

...

... username in Chrome(self.env).cc_list(ticket['cc'])

08/06/12 22:01:01 changed by rjollos

  • description changed.

Add/Change #10171 (CC parsing should use NotifyEmail.addrsep_re.split(ticket['cc']))




Change Properties
Action