Change how direct vs indirect group members are calculated

Summary

Currently indirect vs direct members are calculated by comparing member.source.id to sourceId on the frontend. This works for group members, but will not work for project members because a project and a group could have the same ID so there could be an edge case where a member is inherited but displays as direct.

For example:

"Example Group" - ID 1
|
|-- "Example Project" - ID 1

If we add a member to "Example Group" they should be displayed under "Example Project" as inherited With the current implementation that member would be displayed as a direct member because the IDs are the same.

Improvements

We can instead compare member sources on the backend and pass that to the frontend.

Risks

Low risk, not changing the logic around calculating direct vs indirect members. Changing where this calculation occurs. We also have good unit and feature spec coverage for this feature.

Involved components