def is_contributor(user):
    """Return whether the user is in the 'Registered as contributor' group."""
    return (
        user.is_authenticated and user.groups.filter(name="Registered as contributor").count() > 0
    )