Would I have to create an extra field for auth_user "gid" and SQL join it
with auth_group's "id" ?  Thanks

On Sat, Mar 12, 2011 at 1:47 PM, Bruno Rocha <[email protected]> wrote:

> 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 <[email protected]>
>
>> 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