Hi Ryan,
Thanks for your help so far. I now have the plugin loading, however even
users with TICKET_VIEW permissions are now unable to view tickets resolved
as "Signed". Any idea why this may be happening?
[image: Inline image 3]
2014-07-30 07:11:07,965 Trac[perm] DEBUG: ReadonlySignedTickets denies
temp1 performing TICKET_VIEW on <Resource u'ticket:1969'>
{{{
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_APPEND' or \
action == 'TRAC_ADMIN' or 'TRAC_ADMIN' in perm:
return None
t = Ticket(self.env, resource.id)
if t['resolution'] == 'Signed':
return False
}}}
On Tue, Jul 29, 2014 at 3:55 PM, Ryan Ollos <[email protected]> wrote:
> On Tue, Jul 29, 2014 at 3:48 PM, Jared Bownds <[email protected]>
> wrote:
>
>> When enabling the plugin I can see it's is being loaded successfully.
>> You said the code below works properly for you?
>>
>
> Yes, it works for me.
>
> You will need to change "signed" -> "Signed" according to your previous
> email, and make sure you restart Trac so that the plugin is reloaded after
> making that change.
>
> --
> 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.