Almost ;)

@auth.requires(auth.has_membership('Administrator') or auth.has_membership(
'Manager'))


http://www.web2py.com/books/default/chapter/29/09/access-control#Combining-requirements

Fabiano.

On Monday, August 19, 2013 10:23:21 PM UTC-3, lucas wrote:
>
> i am aware of:
>
> @auth.requires_membership('Administrator')
> def users():
>   etc
>
> however, can we allow for multiple or's, like
>
> @auth.requires_membership('Administrator') 
> or @auth.requires_membership('Manager')
>
> which, of course, is pseudocode cuz i don't really know the syntax.  or 
> perhaps in a set like
>
> @auth.requires_membership(IS_IN_SET(('Administrator','Manager'))
>
> so, can we already do this or can it be suggested?  thanx in advance, lucas
>
>

-- 

--- 
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.

Reply via email to