You have to create groups in auth_groups, then check if user is member of
the group

@auth.requires_membership('leader')

http://web2py.com/book/default/chapter/08#Combining-Requirements

2011/3/12 Jamboo <ghett...@gmail.com>

> I have this simple form where you put your name and address in to
> place an order. http://www.pastie.org/1664006
>
> The problem now is how do I lock this down? I followed the book and
> added "@auth.requires_login()" to my default controller.  That works
> as in protecting the page, but I have 3 types of users planned for my
> web app.  So that would require 3 different types of registration
> forms but how can I tie these users to the auth table where I can say,
> requires_login but also has an user_type of "lender" , "staff" or
> "vendor" ?

Reply via email to