graphql: Add a filter by group

This commit is contained in:
Valentin Tolmer
2021-09-24 22:35:31 +02:00
committed by nitnelave
parent 09a23a1e59
commit eb974e781c
5 changed files with 31 additions and 10 deletions

View File

@@ -65,6 +65,10 @@ fn get_filter_expr(filter: RequestFilter) -> (RequiresGroup, SimpleExpr) {
RequiresGroup(true),
Expr::col((Groups::Table, Groups::DisplayName)).eq(group),
),
MemberOfId(group_id) => (
RequiresGroup(true),
Expr::col((Groups::Table, Groups::GroupId)).eq(group_id),
),
}
}