def is_active(collection_name, document):
    """Return whether the given node settings document is active, e.g. has an external
    account or is configured.
    """
    if collection_name == 'addonfigsharenodesettings':
        return any([
            document['figshare_type'],
            document['figshare_id'],
            document['figshare_title'],
        ])
    elif collection_name == 'googledrivenodesettings':
        return any([
            document['folder_path'],
            document['user_settings'],
            document['folder_id'],
        ])
    elif collection_name == 'forwardnodesettings':
        return document.get('url', False)
    else:
        return bool(document['external_account'])