Depends on workflow, but Stefan was similar to what I was thinking. probably:
auth.settings.create_user_groups = None Then after form submission, depending on workflow, algorithmically add the person to the group...eg. if form.vars.is_editor == True: db.auth_membership.insert(YOUR_DATA_HERE) or whatever you need to actually add the person. On Friday, December 30, 2016 at 7:29:24 AM UTC-6, Biplov Bhandari wrote: > > Hi Stefan, > > The default web2py auth_group adds a person to his own group when the user > is created. I want to override the default behavior. I have fixed number of > auth_group, say authenticated, editor, publisher and admin. I want to > assign a role, based on the form data. if not defaults to authenticated. > > On Friday, December 30, 2016 at 7:49:00 PM UTC+7, 黄祥 wrote: >> >> pardon, not sure what u want to achieve, did auth everybody_group_id is >> what u want? >> e.g. >> # add group id 1 do it in console or controller >> auth.add_group('Admin', 'Admin') >> >> *models/db.py* >> auth.settings.everybody_group_id = 1 >> >> best regards, >> stifan >> > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.