def METHOD_NAME(
    client, user, phase_factory, topic_factory
):
    phase, module, project, topic = setup_phase(
        phase_factory, topic_factory, phases.PrioritizePhase
    )
    topic.module.project.access = Access.SEMIPUBLIC
    topic.module.project.save()
    url = topic.get_absolute_url()
    topic_ct = ContentType.objects.get_for_model(type(topic))
    api_url = reverse(
        "comments-list", kwargs={"content_type": topic_ct.pk, "object_pk": topic.pk}
    )
    comment_data = {"comment": "no comment", "agreed_terms_of_use": True}
    with freeze_phase(phase):
        response = client.get(url)
        assert response.status_code == 200
        assert_template_response(response, "a4_candy_topicprio/topic_detail.html")
        response = client.post(api_url, comment_data, format="json")
        assert response.status_code == 403
        client.login(username=user.email, password="password")
        response = client.get(url)
        assert response.status_code == 200
        assert_template_response(response, "a4_candy_topicprio/topic_detail.html")
        response = client.post(api_url, comment_data, format="json")
        assert response.status_code == 403
        topic.module.project.participants.add(user)
        response = client.get(url)
        assert response.status_code == 200
        assert_template_response(response, "a4_candy_topicprio/topic_detail.html")
        response = client.post(api_url, comment_data, format="json")
        assert response.status_code == 201