Given a user ID with ID of 1 and a group with ID of 1 and role = "Super Admin" and an entry in auth_membership to tie the two together so that user 1 is a member of group 1 I can do:
>>>> auth.has_membership(1,1) True but if I do: >>>> auth.has_membership(1, role="Super admin") False (I'm running latest trunk) Am I being stupid here? I'm following the syntax as described in the book: """ auth.has_membership(group_id, user_id, role) checks whether user_id has membership of the group group_id or the group with the specified role. Only group_id or role should be passed to the function, not both. If the user_id is not specified, then web2py assumes the current logged-in user. """