Read http://web2py.com/book/default/chapter/08#Authorization for more details. If you want, you can handle creating the groups and memberships via appadmin, which will show all the auth tables: http://web2py.com/book/default/chapter/03#More-on-appadmin
On Saturday, March 12, 2011 5:46:45 PM UTC-5, rochacbruno wrote: > NO! > > web2py default auth has 3 base tables auth_user, auth_groups, > auth_membership. > > in auth_membership you store the relation between users and groups. > > > 2011/3/12 Haroon Khalid <[email protected]> > >> 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" ? >>> >>> >>> >> >

