[Trac-dev] Separate ticket attachment and comment permissions
John Siirola <jsiirola <at> gmail.com>
2009-05-03 05:21:24 GMT
Devs,
Is there a "simple" way to separate the permissions for commenting on a
ticket and for attaching files to a ticket? Right now, TICKET_APPEND
grants both permissions. What I want to do is to enable comments, but
disable ticket attachments for certain users (actually based on the
presence of a third permission).
I had hoped to do this through the ILegacyAttachmentPolicyDelegate, but
those delegates are not called for any parent realm that matches the
legacy defaults (ticket, wiki, and milestone).
My second shot is to create another IPermissionPolicy, and have the site
admin list it *before* the LegacyAttachmentPolicy in the list of
providers in trac.ini... but this seems rather inelegant.
At least to me, it raises the more general issue that when checking
permissions, the first provider to return true/false "wins": there isn't
an "easy" way to have a plugin that consistently denies a permission
that would otherwise returns "True" in a given context.
Thanks,
john
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev <at> googlegroups.com
To unsubscribe from this group, send email to trac-dev+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en
(Continue reading)