Merge branch 'feat/collaboration2' of github.com:langgenius/dify into feat/collaboration2

This commit is contained in:
hjlarry 2026-04-13 11:43:52 +08:00
commit d32bc1a364
3 changed files with 6 additions and 13 deletions

View File

@ -6,7 +6,8 @@ from typing import Any
from flask import abort, request
from flask_restx import Resource, fields, marshal_with
from graphon.enums import NodeType
from graphon.file import File, helpers as file_helpers
from graphon.file import File
from graphon.file import helpers as file_helpers
from graphon.graph_engine.manager import GraphEngineManager
from graphon.model_runtime.utils.encoders import jsonable_encoder
from pydantic import BaseModel, Field, ValidationError, field_validator

View File

@ -293,9 +293,7 @@ def test_advanced_chat_run_conversation_not_exists(app, monkeypatch: pytest.Monk
handler(api, app_model=SimpleNamespace(id="app"))
def test_workflow_online_users_filters_inaccessible_workflow(
app, monkeypatch: pytest.MonkeyPatch
) -> None:
def test_workflow_online_users_filters_inaccessible_workflow(app, monkeypatch: pytest.MonkeyPatch) -> None:
app_id_1 = "11111111-1111-1111-1111-111111111111"
app_id_2 = "22222222-2222-2222-2222-222222222222"
signed_avatar_url = "https://files.example.com/signed/avatar-1"
@ -353,9 +351,7 @@ def test_workflow_online_users_filters_inaccessible_workflow(
sign_avatar.assert_called_once_with("avatar-file-id")
def test_workflow_online_users_rejects_excessive_workflow_ids(
app, monkeypatch: pytest.MonkeyPatch
) -> None:
def test_workflow_online_users_rejects_excessive_workflow_ids(app, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setattr(workflow_module, "current_account_with_tenant", lambda: (SimpleNamespace(), "tenant-1"))
accessible_app_ids = Mock(return_value=set())
monkeypatch.setattr(
@ -364,9 +360,7 @@ def test_workflow_online_users_rejects_excessive_workflow_ids(
lambda: SimpleNamespace(get_accessible_app_ids=accessible_app_ids),
)
excessive_ids = ",".join(
f"wf-{index}" for index in range(workflow_module.MAX_WORKFLOW_ONLINE_USERS_QUERY_IDS + 1)
)
excessive_ids = ",".join(f"wf-{index}" for index in range(workflow_module.MAX_WORKFLOW_ONLINE_USERS_QUERY_IDS + 1))
api = workflow_module.WorkflowOnlineUsersApi()
handler = _unwrap(api.get)

View File

@ -129,9 +129,7 @@ class WriteCase:
),
],
)
def test_write_endpoints_require_edit_permission(
app: Flask, monkeypatch: pytest.MonkeyPatch, case: WriteCase
) -> None:
def test_write_endpoints_require_edit_permission(app: Flask, monkeypatch: pytest.MonkeyPatch, case: WriteCase) -> None:
app.config.setdefault("RESTX_MASK_HEADER", "X-Fields")
account = _make_account(TenantAccountRole.NORMAL)
app_model = _make_app()