Modify ↓
#10171 closed defect (fixed)
CC parsing should use NotifyEmail.addrsep_re.split(ticket['cc'])
Reported by: | Mitar | Owned by: | Daniel Kahn Gillmor |
---|---|---|---|
Priority: | normal | Component: | SensitiveTicketsPlugin |
Severity: | normal | Keywords: | |
Cc: | Mitar | Trac Release: | 0.12 |
Description (last modified by )
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 (0)
Change History (3)
comment:1 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 12 years ago by
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'])
comment:3 Changed 12 years ago by
Description: | modified (diff) |
---|
Note: See
TracTickets for help on using
tickets.
(In [11906]) use NotifyEmail.addrsep_re to parse cc field (Closes #10171)