From 3dc0bce421e42475921e69350c6565ca9ece08d9 Mon Sep 17 00:00:00 2001 From: Valentin Tolmer <valentin.tolmer@gmail.com> Date: Mon, 11 Oct 2021 17:08:08 +0200 Subject: [PATCH] graphql: Implement looking up a group's users --- server/src/infra/graphql/query.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/src/infra/graphql/query.rs b/server/src/infra/graphql/query.rs index 6c999c0..bf93d56 100644 --- a/server/src/infra/graphql/query.rs +++ b/server/src/infra/graphql/query.rs @@ -235,7 +235,13 @@ impl<Handler: BackendHandler + Sync> Group<Handler> { if !context.validation_result.is_admin { return Err("Unauthorized access to group data".into()); } - unimplemented!() + Ok(context + .handler + .list_users(Some(DomainRequestFilter::MemberOfId(GroupId( + self.group_id, + )))) + .await + .map(|v| v.into_iter().map(Into::into).collect())?) } }