Thanks so much Silva,
I have declared the code below in default.py
auth.add_group('induvidual', 'induvidual group')
auth.add_group('non_induvidual','induvidual')
if db(db.auth_user.account_type == 'Non Induvidual'):
auth.add_membership(non_induvidual, user_id)
elif
B) To verify user permission use these decorators , using membership or
permission decorators.
http://web2py.com/books/default/chapter/29/09/access-control#Decorators
Em terça-feira, 11 de outubro de 2016 22:54:48 UTC-3, Joe Lwe escreveu:
>
> Hello,
> a)How can i specify automatic group
B) To verify user permission use this:
http://web2py.com/books/default/chapter/29/09/access-control#Decorators
Em terça-feira, 11 de outubro de 2016 22:54:48 UTC-3, Joe Lwe escreveu:
>
> Hello,
> a)How can i specify automatic group assignment on creation of user based
> on a particular
Here have some methods to manage users arround groups:
http://web2py.com/books/default/chapter/29/09/access-control#Authorization
Specially method :
auth.add_membership(group_id, user_id)
That add a user to the group , then you search the group, if ( business and
individual ) , then make a
4 matches
Mail list logo