The web2py admin actually has access to the applications (plural) in my understanding. I thought that giving specific people access to managing users and groups per-application would not be unusual.
Your suggestion looks good, because I assume that this authorisation would only be in the scope of the particular application database(s). Note for anyone reading this thread: The decoration I mentioned in my first post didn't work because admin access was still needed, it just added another layer of authorisation. On Thu, May 30, 2013 at 3:27 PM, Massimo Di Pierro < [email protected]> wrote: > The "admin" group of your application will not give members access to the > "admin" interface or the "appadmin" interface. > > The "admin" in web2py is somebody who have complete and un-restricted > access to the application source and the database. > The groups you create, however you call them, will never give the members > the permission to become "admin". > > If this is what you want to do you can but you need to change the > authorization code inside the appadmin.py controller and replace > > if (request.application == 'admin' and not session.authorized) or \ > (request.application != 'admin' and not > gluon.fileutils.check_credentials(request)): > redirect(URL('admin', 'default', 'index', > vars=dict(send=URL(args=request.args, > vars=request.vars)))) > > with something like: > > if not auth.has_membership(role="admin"): redirect(.....) > > > > On Wednesday, 29 May 2013 22:52:40 UTC-5, Tim Richardson wrote: >> >> I want to give a user the ability to add users for one application. >> >> I have created a group called admin, made her a member, and decorated the >> index function in controller appadmin >> @auth.requires_membership('**admin') >> >> >> Then I have added a link to the index function of the appadmin controller. >> >> I am nervous about this. >> >> >> >> -- > > --- > You received this message because you are subscribed to a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/-jDv4zIBtzw/unsubscribe?hl=en. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Tim Richardson -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

