From 42da86cf729ee7b08658b0cc3fb69d9b68d2f86c Mon Sep 17 00:00:00 2001 From: Valentin Tolmer 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 Group { 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())?) } }