Am 27.07.2010 03:42, schrieb Michael Pedersen: > You have a subtle problem in your code there, and it's easy to miss. > Your permissions in your template should always evaluate to true from > what you've shown. You need to do the following in your template: > > <p py:if="tg.predicates.has_permission( page.permission ).is_met()">Has > full control</p> > > Without that "is_met()" at the end, all calls will result in True, which > is very likely not what you want.
I don't think you need to do that. TurboGears adds a __nonzero__ method to the Predicate class that is automatically calling is_met() for you. -- Christoph -- You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en.

