Works like a charm thanks. On Tue, May 1, 2012 at 7:08 AM, Bruce Wade <bruce.w...@gmail.com> wrote:
> Ok thanks will try using it today. > > > On Tue, May 1, 2012 at 7:01 AM, Anthony <abasta...@gmail.com> wrote: > >> Yes, use the lambda form -- that way it will only do the has_membership >> queries when the index function is called rather than on every request to >> the controller. >> >> Anthony >> >> >> On Tuesday, May 1, 2012 12:50:47 AM UTC-4, Annet wrote: >>> >>> Hi Bruce, >>> >>> I had the same problem, this is the best solution, according to Anthony ( >>> https://groups.google.com/**forum/#!msg/web2py/** >>> A0z8DSZdYTo/H_1N6_4MZfEJ<https://groups.google.com/forum/#%21msg/web2py/A0z8DSZdYTo/H_1N6_4MZfEJ> >>> ): >>> >>> @auth.requires(lambda: auth.has_membership('**Analytics') or >>> auth.has_membership('Analytics Manager)) >>> >>> I made the groups constants, in my case: >>> >>> NODE='Node Manager' >>> HUB='Hub Manager' >>> >>> >>> Best regards, >>> >>> Annet >>> >> > > > -- > -- > Regards, > Bruce Wade > http://ca.linkedin.com/in/brucelwade > http://www.wadecybertech.com > http://www.fittraineronline.com - Fitness Personal Trainers Online > http://www.warplydesigned.com > > -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.fittraineronline.com - Fitness Personal Trainers Online http://www.warplydesigned.com