Ejemplo n.º 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
Ejemplo n.º 2
0
 def reporter(self, message):
     trac_address = self.trac_address
     if not trac_address:
         trac_address = self.env.config.get('notification', 'smtp_replyto')
     user = emailaddr2user(self.env, trac_address)
     if user:
         return user
     return trac_address
Ejemplo n.º 3
0
 def reporter(self, message):
     trac_address = self.trac_address
     if not trac_address:
         trac_address = self.env.config.get('notification', 'smtp_replyto')
     user = emailaddr2user(self.env, trac_address)
     if user:
         return user
     return trac_address
Ejemplo n.º 4
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))
Ejemplo n.º 5
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))
Ejemplo n.º 6
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
Ejemplo n.º 7
0
 def _reporter(self, message):
     """return the ticket updater"""
     user = emailaddr2user(self.env, message['from'])
     # check permissions
     perm = PermissionSystem(self.env)
     if not perm.check_permission('MAIL2TICKET_COMMENT', user) : # None -> 'anoymous'
         raise EmailException("%s does not have MAIL2TRAC_COMMENT permissions" % (user or 'anonymous'))
     
     reporter = user or message['from']
     return reporter
Ejemplo n.º 8
0
    def reporter(self, message):
        """return the ticket reporter or updater"""
        user = emailaddr2user(self.env, message['from'])

        # check permissions
        perm = PermissionSystem(self.env)
        if not perm.check_permission('TICKET_CREATE',
                                     user):  # None -> 'anoymous'
            raise EmailException("%s does not have TICKET_CREATE permissions" %
                                 (user or 'anonymous'))

        reporter = user or message['from']
        return reporter