Edgewall Software

Changes between Version 4 and Version 5 of CookBook/Configuration/SignedTickets


Ignore:
Timestamp:
Aug 29, 2016, 10:59:33 AM (8 years ago)
Author:
Ryan J Ollos
Comment:

Fix indentation.

Legend:

Unmodified
Added
Removed
Modified
  • CookBook/Configuration/SignedTickets

    v4 v5  
    4343
    4444class ReadonlySignedTickets(Component):
    45       implements(IPermissionPolicy)
     45    implements(IPermissionPolicy)
    4646
    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
     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
    5252
    53           t = Ticket(self.env, resource.id)
    54           if t['status'] == 'closed' and t['resolution'] == 'signed':
    55              return False
     53        t = Ticket(self.env, resource.id)
     54        if t['status'] == 'closed' and t['resolution'] == 'signed':
     55            return False
    5656}}}
    5757
     
    9191If you want to use a `signed` ''status'' instead of a resolution, change the last two lines of code to:
    9292{{{#!python
    93           # ...
    94           if t['status'] == 'signed':
    95              return False
     93         # ...
     94        if t['status'] == 'signed':
     95            return False
    9696}}}
    9797And change the workflow step to: