def METHOD_NAME(code: str) -> bool:
    """
    Validate that the given consent code has the access permissions we need,
    and set it as the current consent code for all our e-signing requests
    with DocuSign.
    Returns False if the consent code doesn't have the correct permissions.
    """
    token = request_jwt_user_token(code)
    base_uri = get_account_base_uri(token)
    if not base_uri:
        return False
    cfg = get_config()
    cfg.consent_code = code
    cfg.consent_code_updated_at = timezone.now()
    cfg.base_uri = base_uri
    cfg.save()
    return True