def METHOD_NAME(
    user_factory, group_factory, organisation, project_factory
):
    anonymous = AnonymousUser()
    user = user_factory()
    initiator = user_factory()
    moderator = user_factory()
    admin = user_factory(is_superuser=True)
    group1 = group_factory()
    group2 = group_factory()
    group3 = group_factory()
    group4 = group_factory()
    group_member_in_orga = user_factory.create(groups=(group1, group2))
    group_member_out = user_factory.create(groups=(group2, group3))
    group_member_in_project = user_factory.create(groups=(group2, group4))
    organisation.initiators.add(initiator)
    organisation.groups.add(group1)
    project = project_factory(group=group4, organisation=organisation, is_archived=True)
    project.moderators.add(moderator)
    assert rules.has_perm(perm_name_participate, anonymous, project)
    assert rules.has_perm(perm_name_participate, user, project)
    assert rules.has_perm(perm_name_participate, group_member_in_orga, project)
    assert rules.has_perm(perm_name_participate, group_member_out, project)
    assert rules.has_perm(perm_name_participate, group_member_in_project, project)
    assert rules.has_perm(perm_name_participate, moderator, project)
    assert rules.has_perm(perm_name_participate, initiator, project)
    assert rules.has_perm(perm_name_participate, admin, project)