thanks for the quick reply you are correct. for the record, correct way to decorate is: @identity(is_admin_of())
and in order to access the functions of the User class inside the custom predicate you should: identity.user.is_admin() not identity.is_admin() is_admin of course is a custom defined method in my model. thank you christoph for helping On 13 אוקטובר, 23:28, Christoph Zwerschke <[email protected]> wrote: > Rotem Tamir schrieb: > > > root.py: > > ... > > from noaltg.identity import * > > > @identity.require(identity.is_admin_of("9")) > > ... > > > AttributeError: 'module' object has no attribute 'is_admin_of' > > > what am i doing wrong? > > Methinks it should be simply "is_admin_of" instead of > "identity.is_admin_of" in the require() decorator. > > -- 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 -~----------~----~----~----~------~----~------~--~---

