def test_member_cannot_view_other_users_info(
    user_owned_collection,
    normal_user_client: R2RClient,
    another_normal_user_client: R2RClient,
):
    """A member (non-owner) of a collection should not be able to retrieve
    other users' details outside of their allowed scope."""
    # Add the other normal user as a member
    another_user_id = another_normal_user_client.users.me().results.id
    normal_user_client.collections.add_user(user_owned_collection,
                                            another_user_id)

    # As another_normal_user_client (a member), try to retrieve owner user details
    owner_id = normal_user_client.users.me().results.id
    with pytest.raises(R2RException) as exc_info:
        another_normal_user_client.users.retrieve(owner_id)
    assert exc_info.value.status_code == 403, (
        "Members should not be able to view other users' details.")
A member (non-owner) of a collection should not be able to retrieve
    other users' details outside of their allowed scope.
py/tests/integration/test_collections_users_interaction.py