Edgewall Software

Changes between Version 8 and Version 9 of CookBook/Configuration/SignedTickets


Ignore:
Timestamp:
Sep 22, 2016, 6:59:29 AM (8 years ago)
Author:
Ryan J Ollos
Comment:

Skip permission checks on admin_actions.

Legend:

Unmodified
Added
Removed
Modified
  • CookBook/Configuration/SignedTickets

    v8 v9  
    6666
    6767    allowed_actions = ('TICKET_VIEW',)
     68    admin_actions = ('TICKET_ADMIN', 'TRAC_ADMIN')
    6869
    6970    def check_permission(self, action, username, resource, perm):
     
    7172                resource.id is None or \
    7273                action in self.allowed_actions or \
    73                 action == 'TICKET_ADMIN' or 'TICKET_ADMIN' in perm:
     74                action in self.admin_actions or \
     75                any(a in perm for a in self.admin_actions):
    7476            return None
    7577