def METHOD_NAME(self):
    xref.xref_collection(self.residents)
    url = "/api/2/collections/%s/xref" % self.residents.id
    # Not logged in
    res = self.client.get(url)
    assert res.status_code == 403, res
    self.grant_publish(self.residents)
    res = self.client.get(url)
    assert res.status_code == 200, res
    assert res.json["total"] == 1, res.json
    res0 = res.json["results"][0]
    assert "Leeta" in get_caption(res0["entity"])
    assert "Garak" not in get_caption(res0["entity"])
    assert "Tain" not in get_caption(res0["match"])
    assert "MPella" not in get_caption(res0["match"])
    # Logged in as outsider (restricted)
    _, headers = self.login("outsider")
    res = self.client.get(url, headers=headers)
    assert res.status_code == 200, res
    assert res.json["total"] == 1, res.json
    res0 = res.json["results"][0]
    assert "Leeta" in get_caption(res0["entity"])
    assert "Garak" not in get_caption(res0["entity"])
    assert "Tain" not in get_caption(res0["match"])
    assert "MPella" not in get_caption(res0["match"])
    # Logged in as creator (all access)
    _, headers = self.login("creator")
    res = self.client.get(url, headers=headers)
    assert res.status_code == 200, res
    assert res.json["total"] == 2, res.json
    res0 = res.json["results"][0]
    assert "Garak" in get_caption(res0["entity"])
    assert "Leeta" not in get_caption(res0["entity"])
    assert "Tain" not in get_caption(res0["match"])
    assert "MPella" not in get_caption(res0["match"])
    res1 = res.json["results"][1]
    assert "Leeta" in get_caption(res1["entity"])
    assert "Garak" not in get_caption(res1["entity"])
    assert "Tain" not in get_caption(res1["match"])
    assert "MPella" not in get_caption(res1["match"])