def apply_ticket_permissions(env, req, tickets):
    """Apply permissions to a set of milestone tickets as returned by
    `get_tickets_for_milestone()`."""
    return [t for t in tickets
            if req.perm('ticket', t['id']) in 'TICKET_VIEW']
dataset/ETHPy150Open edgewall/trac/trac/ticket/roadmap.py/apply_ticket_permissions/swapped operands of `in`