fix(api): grant WebApp access to file input default values - #41763
Open
Souravrajvi0 wants to merge 1 commit into
Open
fix(api): grant WebApp access to file input default values#41763Souravrajvi0 wants to merge 1 commit into
Souravrajvi0 wants to merge 1 commit into
Conversation
When a workflow file or file-list input uses a studio-configured default, the upload file is owned by the account rather than the end user. Grant those default upload file IDs in the request scope before resolving inputs so WebApp runs can read them, matching Preview behavior. Fixes langgenius#41727
Souravrajvi0
requested review from
QuantumGhost and
laipz8200
as code owners
September 3, 2026 19:34
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-09-03 19:36:20.013808221 +0000
+++ /tmp/pyrefly_pr.txt 2026-09-03 19:36:04.791755203 +0000
@@ -4835,7 +4835,9 @@
ERROR Class member `_DummyConverter.convert_stream_simple_response` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
--> tests/unit_tests/core/app/apps/test_base_app_generate_response_converter.py:47:9
ERROR Object of class `Account` has no attribute `tenant_id` [missing-attribute]
- --> tests/unit_tests/core/app/apps/test_base_app_generator.py:599:9
+ --> tests/unit_tests/core/app/apps/test_base_app_generator.py:605:9
+ERROR Argument `list[FromClause]` is not assignable to parameter `tables` with type `Sequence[Table] | None` in function `sqlalchemy.sql.schema.MetaData.create_all` [bad-argument-type]
+ --> tests/unit_tests/core/app/apps/test_base_app_generator.py:630:58
ERROR Class member `DummyQueueManager._publish` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
--> tests/unit_tests/core/app/apps/test_base_app_queue_manager.py:21:9
ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState | None` in function `core.app.apps.base_app_queue_manager.AppQueueManager.graph_runtime_state` [bad-argument-type]
|
Contributor
Pyrefly Type Coverage
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Invalid upload fileContext
Fixes #41727
When a Chatflow File List input has a default value, Preview works but WebApp fails with
Invalid upload file. Preview runs as the Account (ownership filter skipped); WebApp runs as an EndUser (requires_user_ownership=True), so account-owned default uploads are rejected.This uses the existing
grant_upload_file_accessmechanism (same approach as knowledge-base retrieved images in v1.15.0).Test plan
uv run pytest tests/unit_tests/core/app/apps/test_base_app_generator.py -q(22 passed)