Edgewall Software

Ticket #7010: reopen.diff

File reopen.diff, 1.2 KB (added by tg@…, 4 years ago)

Patch to split TICKET_APPEND into TICKET_{APPEND,REOPEN}

  • api.

    old new  
    182182    # IPermissionRequestor methods 
    183183 
    184184    def get_permission_actions(self): 
    185         return ['TICKET_APPEND', 'TICKET_CREATE', 'TICKET_CHGPROP', 
     185        return ['TICKET_REOPEN', 'TICKET_APPEND', 'TICKET_CREATE', 'TICKET_CHGPROP', 
    186186                'TICKET_VIEW', 
    187                 ('TICKET_MODIFY', ['TICKET_APPEND', 'TICKET_CHGPROP']),   
     187                ('TICKET_MODIFY', ['TICKET_REOPEN', 'TICKET_APPEND', 'TICKET_CHGPROP']),   
    188188                ('TICKET_ADMIN', ['TICKET_CREATE', 'TICKET_MODIFY',   
    189189                                  'TICKET_VIEW'])] 
    190190 
  • web_ui.

    old new  
    657657        # Add the possible actions to hdf 
    658658        actions = TicketSystem(self.env).get_available_actions(ticket, req.perm) 
    659659        for action in actions: 
     660            if action == 'reopen' and not req.perm.has_permission('TICKET_REOPEN'): 
     661                continue 
    660662            req.hdf['ticket.actions.' + action] = '1' 
    661663 
    662664    def grouped_changelog_entries(self, ticket, db, when=0):