Hi, I habe some groups in auth_group with roles like "teacher", "student",
"administrator"
There are persons in auth_user with a membership to one or more of these
groups.
Now I want to show in a smartgrid only the "teacher"s
sg = SQLFORM.smartgrid(db.auth_user, constraints=dict(auth_user=query))
but what would be the right query?
I have tried
query = (db.auth_user.id == db.auth_membership.id) &
(db.auth_membership.group_id == 1) # does not show all persons
query = db(auth.accessible_query('teacher', db.auth_user))
query = db(auth.has_membership(role='teacher')) # ok, I know that's
wrong...
Regards, Martin