Peter, Should this be included, or excluded? For clarity, please provide the entire block of code that should be used to implement the following behavior:
- Once a ticket is resolved as 'Signed', the ticket is now read only except by TRAC_ADMIN Next, how do we implement the desired error feedback outlined below? - Visually distinguish tickets resolved as 'Signed' by either slightly changing the color of the description body, or add a draft style 'SIGNED' watermark to the right and left side of the description body. On Mon, Jul 28, 2014 at 10:55 AM, Peter Suter <[email protected]> wrote: > Oops, and now I dropped the `if t['resolution'] == 'Signed':` test by > mistake.. > > > {{{ > from trac.core import * > from trac.perm import IPermissionPolicy > from trac.ticket.model import Ticket > > class ReadonlySignedTickets(Component): > implements(IPermissionPolicy) > > def check_permission(self, action, username, resource, perm): > if resource is None or resource.realm != 'ticket' or \ > resource.id is None or action == 'TICKET_VIEW' or \ > action == 'TRAC_ADMIN' or 'TRAC_ADMIN' in perm: > return None > > t = Ticket(self.env, resource.id) > if t['resolution'] == 'Signed': > return False > }}} > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Trac Users" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/trac-users/1GNDHTObQKg/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/trac-users. > For more options, visit https://groups.google.com/d/optout. > -- Jared Bownds c. 916-224-2324 e. Jared.Bownds@g <[email protected]>mail.com -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.
