示例#1
0
 def match(self, message):
     reporter = emailaddr2user(self.env, message['from'])
     reply_to_ticket = ReplyToTicket(self.env)
     perm = PermissionCache(self.env, reporter)
     if 'TICKET_ADD_HOURS' in perm('ticket', reply_to_ticket.ticket(message).id):
         return bool(reply_to_ticket.ticket(message))
     else:
         return False
示例#2
0
 def match(self, message):
     reporter = emailaddr2user(self.env, message['from'])
     reply_to_ticket = ReplyToTicket(self.env)
     
     perm = PermissionCache(self.env, reporter)        
     if not perm.has_permission('TICKET_ADD_HOURS'):
         return False
     return bool(reply_to_ticket.ticket(message))
示例#3
0
    def match(self, message):
        reporter = emailaddr2user(self.env, message['from'])
        reply_to_ticket = ReplyToTicket(self.env)

        perm = PermissionCache(self.env, reporter)
        if not perm.has_permission('TICKET_ADD_HOURS'):
            return False
        return bool(reply_to_ticket.ticket(message))
示例#4
0
 def match(self, message):
     reporter = emailaddr2user(self.env, message['from'])
     reply_to_ticket = ReplyToTicket(self.env)
     perm = PermissionCache(self.env, reporter)
     if 'TICKET_ADD_HOURS' in perm('ticket',
                                   reply_to_ticket.ticket(message).id):
         return bool(reply_to_ticket.ticket(message))
     else:
         return False
示例#5
0
 def invoke(self, message, warnings):
     reply_to_ticket = ReplyToTicket(self.env)
     ticket = reply_to_ticket.ticket(message)
     payload = message.get_payload()
     if isinstance(payload, basestring):
         if message.get('Content-Disposition', 'inline') == 'inline' and message.get_content_maintype() == 'text':
             message.set_payload(self.munge_comment(payload, ticket))
     else:
         for _message in payload:
             self.invoke(_message, warnings)
     return message
示例#6
0
 def invoke(self, message, warnings):
     reply_to_ticket = ReplyToTicket(self.env)
     ticket = reply_to_ticket.ticket(message)
     payload = message.get_payload()
     if isinstance(payload, basestring):
         if message.get('Content-Disposition', 'inline') == 'inline' \
                 and message.get_content_maintype() == 'text':
             message.set_payload(self.munge_comment(payload, ticket))
     else:
         for _message in payload:
             self.invoke(_message, warnings)
     return message