You can put them in db.py after auth=..., or in a registration
controller or simply in the user() action. As long as they are
executed before the registration form runs.

Massimo

On Mar 20, 12:30 pm, Matthew McNaughton <mamcnaugh...@gmail.com>
wrote:
> DO the commands in 1) go into the db.py after auth=Auth(globals(),db) or
> in a new controller that is created for user registration?
>
> On Sat, 2010-03-20 at 08:03 -0700, mdipierro wrote:
> > Good questions:
>
> > 1)
>
> > if not db(db.auth_group.role=='users').count():
> >      db.auth_group.insert(role='users')
> > auth.settings.register_onaccept=lambda form:
> > auth.add_membership(auth.id_group('users'),form.vars.id)
>
> > 2)
> > Not sure what you mean by file renaming. Can you explain more?
> > To keep track of downloads create your own download function
>
> > def download():
> >     ### log the download, filename is in request.args(0) and user in
> > auth.user_id
> >     return response.download(request,db)
>
> > On Mar 20, 2:11 am, Matthew McNaughton <mamcnaugh...@gmail.com> wrote:
> > > Greetings all,
> > > I've read the access control section in book a couple times over, and I
> > > still can't completely figure out authorization. I want to do the
> > > following:
> > > I want to add all newly registered users to a specific group called
> > > "users", which I have already created in auth_groups
>
> > > I have another group called "admin" which can add records to the various
> > > databases. The only way to begin this user is use the web2py
> > > administrator login. Where do I put the access privileges for this
> > > group?
>
> > > A related question. If I have certain files that the user can upload and
> > > download. How do i manage the file renaming in the mysql db? Also, how
> > > do I keep track of the files that a user download from the server.
>
> > > I apologize for the newb questions. Thank you again for all the help so
> > > far.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to