---
title: Listing Allies for a Given Account
slug: listing-allies-for-a-given-account
createdAt: 2022-10-26T21:38:26.000Z
---

:::hint{type="info"}
**STATUS**: DEPLOYED
:::

## Summary

The core value for a Seller is the ability to gain access to an Account they are interested in.&#x20;

They want to see a list of the Allies they are connected with who have a given Account.

### Design Problem

Currently, to support the Invite flow, the concept of an Ally object has a separate Invitee and Inviter.

However, a Seller can be either the Invitee or the Inviter.

While it's easy to query for the subcollection of ally objects, right now, the Ally's reference document can be either in the invitee or userInviter field.

One idea is to have a custom function with three parameters:

1. Invitee Field
2. UserInviter Field
3. Authenticater User

The custom functions returns whatever != Authenticated User.

## Status

This looks like it's solved.
