def is_community_only(user, project):
    """Return True is this project or user should only be shown community ads"""
    if user.is_authenticated() and user.profile.as_opt_out:
        return True
    if not project.allow_promos:
        return True
    return False