Jyong
79116d8c4b
feat(knowledge-fs): scope dataset API keys by knowledge base type
...
Legacy knowledge bases (`datasets`) and KnowledgeFS spaces
(`knowledge_fs_control_spaces`) live in different tables, so a dataset API
key binding could only ever name a legacy dataset and the KnowledgeFS service
API never consulted bindings at all: a key scoped to specific knowledge bases
still reached every KnowledgeFS space in the workspace.
- Bindings carry a `resource_type` (`dataset` | `knowledge_fs_space`) and a
nullable `control_space_id` (migration 9a4e7d1c2b60, existing rows stay
`dataset`), with a CHECK that exactly one id column matches the type.
- `dataset_api_key_service` exposes the key scope by kind, validates and
binds KnowledgeFS spaces (tenant-owned, not deleting/deleted), and cleans up
keys scoped only to a space when its deletion is requested. The orphan-key
cleanup is now NULL-safe so a space binding keeps a key alive.
- Legacy dataset routes only honour `dataset` bindings; the KnowledgeFS
authorization service only honours `knowledge_fs_space` bindings and raises
a scope error that the service API maps to 403 (unknown keys stay 401).
- Console key creation accepts `knowledge_space_ids`; list/create responses
return them next to `dataset_ids`.
- The web scope picker lists KnowledgeFS spaces alongside legacy datasets
when KnowledgeFS is enabled and submits the ids by kind; the scope column
counts both.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015zw5G5SX3HmVfnZof6YWAc
2026-09-03 05:59:39 -04:00
Stephen Zhou
42cb6519ea
Merge remote-tracking branch 'origin/main' into deploy/konwledge
2026-09-03 16:32:30 +08:00
非法操作
d8c3f7c5ee
refactor(openapi): inject file upload service ( #41606 )
2026-09-03 04:42:31 +00:00
Stephen Zhou
30ed0907f3
Merge remote-tracking branch 'origin/main' into deploy/konwledge
...
# Conflicts:
# api/controllers/console/app/site.py
# api/controllers/console/datasets/datasets.py
# api/core/plugin/backwards_invocation/model.py
# api/core/rag/rerank/rerank_model.py
# api/tests/test_containers_integration_tests/controllers/console/auth/test_oauth_server.py
# api/tests/unit_tests/core/plugin/test_backwards_invocation_model.py
# api/tests/unit_tests/tasks/test_batch_clean_document_task.py
# packages/contracts/generated/api/service/orpc.gen.ts
# web/app/components/datasets/rename-modal/index.tsx
# web/app/components/header/account-setting/model-provider-page/model-selector/popup-layout.tsx
# web/features/tag-management/components/tag-search-content.tsx
2026-08-27 10:06:48 +08:00
Stephen Zhou
1c6f0a0388
fix(api): restore Service API OpenAPI semantics ( #41274 )
2026-08-26 05:05:36 +00:00
Stephen Zhou
92016aa139
fix(api): align Service API OpenAPI contract ( #41248 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-25 10:54:14 +00:00
Stephen Zhou
574461604d
Merge remote-tracking branch 'origin/main' into deploy/konwledge
...
# Conflicts:
# api/commands/system.py
# api/controllers/console/init_validate.py
# api/controllers/console/workspace/account.py
# api/controllers/console/wraps.py
# api/controllers/openapi/auth/data.py
# api/core/hosting_configuration.py
# api/core/provider_manager.py
# api/core/rag/retrieval/dataset_retrieval.py
# api/services/workspace_service.py
# api/tasks/workflow_cfs_scheduler/entities.py
# api/tests/test_containers_integration_tests/controllers/console/auth/test_password_reset.py
# api/tests/test_containers_integration_tests/services/test_feature_service.py
# api/tests/unit_tests/controllers/console/auth/test_account_activation.py
# api/tests/unit_tests/controllers/openapi/auth/test_data.py
# api/tests/unit_tests/controllers/service_api/app/test_hitl_service_api.py
# api/tests/unit_tests/extensions/otel/test_retrieval_tracing.py
# api/tests/unit_tests/services/test_feature_service_knowledge_fs.py
# dev/start-worker
# packages/contracts/console.ts
# packages/contracts/package.json
# packages/iconify-collections/custom-public/icons.json
# web/app/components/workflow/__tests__/index.spec.tsx
# web/app/components/workflow/index.tsx
# web/features/new-rag/document-chunk-tree.tsx
# web/service/fetch.spec.ts
2026-08-12 10:33:29 +08:00
WH-2099
ef8544b173
fix(api): bind dataset operations to owners ( #40149 )
2026-08-11 16:37:14 +00:00
Byron.wang
c1e94f8ee7
refactor(api): consolidate deployment edition handling ( #40142 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-11 07:39:01 +00:00
Jyong
3d99416631
Implement application updates
2026-08-03 05:01:00 -04:00
zyssyz123
f86bfb2a31
feat(agent): support new Agent DSL import and export ( #38849 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 02:02:14 +00:00
yyh
323654afe2
fix: align member invitation flow and API contracts ( #38856 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-13 15:16:23 +00:00
L1nSn0w
915655683c
refactor(openapi): resource-oriented paths for /openapi/v1 + difyctl version gate ( #38367 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-08 02:22:59 +00:00
chariri
c3b1508712
refactor(api): migrate workspace account endpoints to BaseModel ( #37954 )
2026-07-06 06:57:40 +00:00
chariri
2e9c0a3c7a
refactor(api): migrate response contract tooling to BaseModel ( #37950 )
2026-06-26 00:11:04 +00:00
Xiyuan Chen
b3e5f29421
fix(app): derive get-app --mode whitelist from listable app types ( #37761 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-23 04:40:05 +00:00
Xiyuan Chen
084f122814
refactor(openapi/cli): split app usage-face from studio-app build-face ( #37641 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-22 07:46:59 +00:00
Wu Tianwei
33edf97f81
feat: RBAC ( #37107 )
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: fatelei <fatelei@gmail.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: 盐粒 Yanli <yanli@dify.ai>
Co-authored-by: Charles Yao <chongbinyao33@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: yunlu.wen <yunlu.wen@dify.ai>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
Co-authored-by: Jingyi <jingyi.qi@dify.ai>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: hjlarry <hjlarry@163.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Xiyuan Chen <52963600+GareArc@users.noreply.github.com>
Co-authored-by: gigglewang <gigglewang@dify.ai>
Co-authored-by: chariri <w@chariri.moe>
Co-authored-by: Evan <2869018789@qq.com>
Co-authored-by: zyssyz123 <916125788@qq.com>
2026-06-18 16:35:29 +00:00
Stephen Zhou
c52eafe2ca
docs: enrich generated service API descriptions ( #37615 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-18 08:43:39 +00:00
Stephen Zhou
baf775134e
fix: improve Service API OpenAPI contracts ( #37592 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-17 14:25:30 +00:00
Stephen Zhou
5d77c0af08
refactor: fix OpenAPI contract generation schemas ( #37387 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-12 14:25:53 +00:00
Stephen Zhou
e0c6ca9930
fix: GET query parameter OpenAPI contracts ( #37378 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-12 09:01:22 +00:00
Asuka Minato
6c0cce4b7f
chore: update to openapi v3 by change dep ( #37316 )
...
Co-authored-by: Stephen Zhou <38493346+hyoban@users.noreply.github.com>
Co-authored-by: Stephen Zhou <hi@hyoban.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-12 07:52:19 +00:00