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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.