graphql: Implement looking up a group's users

This commit is contained in:
Valentin Tolmer 2021-10-11 17:08:08 +02:00 committed by nitnelave
parent 65780ae0fe
commit 42da86cf72

View File

@ -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())?)
}
}