Also, I haven't tried it, but here's a link to a web2py user admin plugin: http://jaguar.biologie.hu-berlin.de/~fkrause/web2py.plugin.useradmin.w2p. You might also check some of the appliances here: http://www.web2py.com/appliances/ Anthony
On Tuesday, April 19, 2011 2:48:05 PM UTC-4, Anthony wrote: > On Tuesday, April 19, 2011 2:16:47 PM UTC-4, Keith Pettit wrote: >> >> I'm still learning web2py, I'm working on access control and was confused >> by a few things I was hoping to understand better. >> >> 1 - Why is auth_user in db.py, but none of the other auth_ tables are? >> > > Once you create the auth object, when you call: > > auth.define_tables() > > all of the auth tables are automatically defined/created for you, so you > don't need to define any of them in db.py. If you're using the web2py > wizard, I believe it does create a custom auth_user table in db.py, which is > probably what you're seeing. > > >> >> 2 - If I wanted to add or modify any of the auth tables, how would I do >> that? auth_user is in db.py but the other auth_ tables aren't. Previously >> when I tried to define a auth_group or similar access control table I got >> all sorts of errors but I can't find anywhere else to modify them. >> > > Follow the instructions at > http://web2py.com/book/default/chapter/08#Customizing-Auth. Note, you have > to define your custom tables *after* you have created the auth object, but > *before* you call auth.define_tables() -- because the latter automatically > defines all tables that have not already been defined. > > To see what the default version of each table looks like, look at the > define_tables() method of the Auth class in /gluon/tools.py: > http://code.google.com/p/web2py/source/browse/gluon/tools.py#1116 > > >> >> 3- Are there any plugin's or appliances for web2py with a admin already >> done for user/group management? >> > > Well, for starters, you can just use 'appadmin' to add/edit/delete users, > groups, and permissions (see > http://web2py.com/book/default/chapter/03#More-on-appadmin). > > Anthony > >