Is there a recommended way of implementing IPermissionPolicy such that
multiple policies don't cause infinite recursion?  I'm writing a
simple policy similar to SensitiveTicketsPolicy that requires a new
permission in order to view sensitive components, and I would like to
use it in combination with PrivateTicketsPolicy.

The problem is evident when enabling SensitiveTicketsPolicy and
PrivateTicketsPolicy.  The former checks for the VIEW_SENSITIVE
permission, which causes PrivateTicketsPolicy's check_permission to be
called.  PrivateTicketsPolicy, in turn, checks for its permissions,
which causes SensitiveTicketsPolicy's check_permission to be called,
until maximum recursion depth is hit.

Is there a cleaner solution than having my policy explicitly ignore
the PrivateTicketsPolicy permissions?

Thanks,
Christian

--

You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=.


Reply via email to