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_HE
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 authe
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.
3 matches
Mail list logo