Awesome, exactly what I was looking for Anthony, thanks!
On 02/28/2014 09:42 AM, Anthony wrote:
auth.user_groups should be a dict like {group id: role, ...}
Anthony
On Friday, February 28, 2014 12:03:45 PM UTC-5, Julio F. Schwarzbeck wrote:
Folks,
is there an API (couldn't find it) it Auth that returns the memberships
that the user belong to?, I guess something like:
memberships = auth.get_memberships()
Returning a list or dict of objects/tuples/etc with ids and names or
something similar..
I understand that this could be accomplished with a query to
auth_user-->auth_membership-->auth_group but but I'd like to stick
using
APIs for authentication as much as possible, if not, are we open to the
possibility to add this to Auth?
Cheers,
Julio
--
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
web2py+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/ez6zc...@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
--
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.