Expose private group members to public shared group members
After #364078 feature flag is enabled we'll start showing shared members on the project/group membership page. But we'll only show the members from the invited groups where the current user has access.
For instance, when a private group is invited to a public group we don't show the members of the private group to the public group members. We want to change this to enable better collaboration between the two groups as they should know who all are there in the shared group.
But we need to hide the source of the membership i.e. the group name and url when the current user doesn't have access to the private group.
Also, the private group members will only be shown to the public shared group members. If the current user is unauthenticated or is not a member of the shared group then we should not return the members of the private group.
This has to be done in parallel to https://gitlab.com/gitlab-org/gitlab/-/issues/418789 to hide the private group names. Either do both of these issues in the same MR or behind the same feature flag and deploy them together.