I'm sorry. Correct version:

@auth.requires(lambda: auth.has_membership('green') or auth.has_membership(
'blue'))
def functionX():
...



As for the object, I would just use the name of the function for now. It 
really only matters if you're using crud as it knows what to do with it and 
record_id if '<object>' is the name of a table. Something like 
auth.add_permission(group_id, 'execute', 'functionX') and then:

auth.requires_permission('execute', 'functionX')
def functionX():
...

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to