On Dec 12, 11:40 pm, Luther Goh Lu Feng <[email protected]> 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, that confirmation was what I was looking for. I made the change in the book. Could you please confirm for me whether the following lines, which appear before the section on decorators, are in fact correct: >>> agents = auth.add_group(role = 'Secret Agent') >>> auth.add_membership(agents, james_bond) >>> auth.add_permission(agents, 'read', secrets) In other words, are these lines fine to have the "agents" role being passed directly instead of by name?

