[web2py] Re: Error in decorator section of web2py book

2010-12-12 Thread cjrh
On Dec 12, 11:40 pm, Luther Goh Lu Feng wrote: > Hmm, I actually deployed an app that uses that method: > > https://github.com/elfgoh/mustardjuice/blob/master/web2py/application... > > @auth.requires_membership('admin') worked but not > @auth.requires_membership(admin) (Line 56, 61) Ok, great, th

[web2py] Re: Error in decorator section of web2py book

2010-12-12 Thread Luther Goh Lu Feng
On Dec 12, 10:58 pm, cjrh wrote: > On Dec 11, 7:44 pm, Luther Goh Lu Feng wrote: > > > Line 8 of code snippet should be > > @auth.requires_membership('agents') > > not > > @auth.requires_membership(agents) > > Are you sure?   I haven't tried it out myself, but I note that in a > subsequent line

[web2py] Re: Error in decorator section of web2py book

2010-12-12 Thread cjrh
On Dec 11, 7:44 pm, Luther Goh Lu Feng wrote: > Line 8 of code snippet should be > @auth.requires_membership('agents') > not > @auth.requires_membership(agents) Are you sure? I haven't tried it out myself, but I note that in a subsequent line: @auth.requires_permission('read', secrets) def fun