I don't totally follow. Normally you would use "has_membership": http://web2py.com/book/default/chapter/08#Authorization
The != might not work because everyone who is in one group might also not be in another group. I think you want to do something where you are explicit about which group or membership you are selecting for. For example: db(db.auth_membership.id==1).select() db(db.auth_membership.group_id=='mygroup').select() Or use has_membership: auth.has_membership(group_id, user_id, role)

