langflow-ai/langflow · error · HTTPException

Custom component editing is restricted to administrators

Error message

Custom component editing is restricted to administrators

What it means

Error "Custom component editing is restricted to administrators" thrown in langflow-ai/langflow.

Source

Thrown at src/backend/base/langflow/api/v1/endpoints.py:1471

    settings_service = get_settings_service()
    all_known = None
    if _requires_component_hash_lookups(settings_service.settings, user):
        get_component_hash_lookups_for_validation()
        all_known = component_cache.all_known_hashes
        if all_known is None:
            raise HTTPException(
                status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
                detail="Component templates are still initializing. Please try again in a few seconds.",
            )

    # In admin-only mode, non-admin users may refresh/update only known server
    # templates. Truly custom code edits remain restricted to administrators.
    if (
        getattr(settings_service.settings, "custom_component_admin_only", False) is True
        and not user.is_superuser
        and not code_hash_matches_any_template(code_request.code, all_known)
    ):
        raise HTTPException(
            status_code=status.HTTP_403_FORBIDDEN,
            detail="Custom component editing is restricted to administrators",
        )

    if not settings_service.settings.allow_custom_components and not code_hash_matches_any_template(
        code_request.code, all_known
    ):
        raise HTTPException(
            status_code=status.HTTP_403_FORBIDDEN,
            detail="Custom component creation is disabled",
        )

    # In restricted mode the request only reached here by matching a known
    # template hash. Because that hash is a truncated digest, execute the
    # server's trusted copy keyed by the same hash rather than the client
    # bytes (defeats a hash collision), failing closed if it can't be found.
    effective_code = code_request.code
    if _requires_component_hash_lookups(settings_service.settings, user):

View on GitHub (pinned to 976ec789d2)

Solutions

  1. Perform the edit as an administrator, or ask an admin to make the change.

When it happens

Trigger: Occurs when a non-administrator user attempts to edit a custom component while admin-only editing is enforced.

Common situations: See trigger scenarios.


AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14). Data as JSON: /api/errors/8ac5936d4284893c. Report an issue: GitHub.