On Thursday, February 2, 2017 at 5:12:35 PM UTC-8, Leonel Câmara wrote:
>
> The most correct way would be to give permission to both groups and then
> use requires_permission.
>
>
In auth.add_permission(group_id, 'name', 'object', record_id), what would I
specify as the object in order to gate using the function I'm decorating?
Maybe an arbitrary file in the server filesystem?
> If you don't plan on using permissions:
>
> @auth.requires(auth.has_membership('green') or auth.has_membership('blue'))
> def functionX():
> ...
>
This is what I had above, but the quotemarks got lost in copying-editing.
I've tried it with and without using the name of the parameter.
/dps
--
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.