Changes between Version 4 and Version 5 of CookBook/Configuration/SignedTickets
- Timestamp:
- Aug 29, 2016, 10:59:33 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CookBook/Configuration/SignedTickets
v4 v5 43 43 44 44 class ReadonlySignedTickets(Component): 45 45 implements(IPermissionPolicy) 46 46 47 48 49 resource.id is None or action == 'TICKET_VIEW' or \50 action == 'TICKET_ADMIN' or 'TICKET_ADMIN' in perm:51 47 def check_permission(self, action, username, resource, perm): 48 if resource is None or resource.realm != 'ticket' or \ 49 resource.id is None or action == 'TICKET_VIEW' or \ 50 action == 'TICKET_ADMIN' or 'TICKET_ADMIN' in perm: 51 return None 52 52 53 54 55 53 t = Ticket(self.env, resource.id) 54 if t['status'] == 'closed' and t['resolution'] == 'signed': 55 return False 56 56 }}} 57 57 … … 91 91 If you want to use a `signed` ''status'' instead of a resolution, change the last two lines of code to: 92 92 {{{#!python 93 94 95 93 # ... 94 if t['status'] == 'signed': 95 return False 96 96 }}} 97 97 And change the workflow step to: