On 14 sep, 14:24, mdipierro <[email protected]> wrote:
> you can do
>
> @auth.requires(auth.has_membership(auth.id_group('role1')) or
> auth.has_membership(auth.id_group('role2')))
>
> but this is not the right way to handle it.
>
> You should add permissions:
>
> auth.add_permission('run_this',group_id=id.group('role1'))
> auth.add_permission('run_this',group_id=id.group('role2'))
>
> and then check if user is a member of a group that has such
> permissions
>
> @auth.requires_permission('run_this')
>

thanks, I'll see
Jose
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to