dify/web/app/components
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
..
__tests__ fix(web): make registration tracking consent-safe and retryable (#41365) 2026-08-31 03:39:37 +00:00
access-rules-editor fix: protect workspace owners in resource access (#41423) 2026-08-28 03:03:40 +00:00
api-key feat(knowledge-fs): scope dataset API keys by knowledge base type 2026-09-03 05:59:39 -04:00
app feat(knowledge-fs): scope dataset API keys by knowledge base type 2026-09-03 05:59:39 -04:00
app-sidebar chore(web): canonicalize Tailwind classes (#41718) 2026-09-03 07:33:05 +00:00
apps chore(web): canonicalize Tailwind classes (#41718) 2026-09-03 07:33:05 +00:00
base Merge remote-tracking branch 'origin/main' into deploy/konwledge 2026-09-03 16:32:30 +08:00
billing chore(web): canonicalize Tailwind classes (#41718) 2026-09-03 07:33:05 +00:00
custom chore: upgrade Vite+ to 0.2.9 (#40762) 2026-08-14 04:42:28 +00:00
datasets refactor(knowledge-fs): split translations into dedicated namespace 2026-09-03 17:37:59 +08:00
detail-sidebar fix: prevent sidebar footer actions from triggering hover preview (#41230) 2026-08-25 06:53:52 +00:00
devtools revert(web): restore Agentation devtool (#41387) 2026-08-27 09:09:44 +00:00
explore chore(web): canonicalize Tailwind classes (#41718) 2026-09-03 07:33:05 +00:00
goto-anything fix(agent): add roster publication status contract (#41435) 2026-08-28 08:50:30 +00:00
header chore(web): canonicalize Tailwind classes (#41718) 2026-09-03 07:33:05 +00:00
integrations fix(web): resolve marketplace plugin ids before install 2026-09-01 18:25:08 +08:00
main-nav Merge remote-tracking branch 'origin/main' into deploy/konwledge 2026-09-03 16:33:04 +08:00
plugins chore(web): canonicalize Tailwind classes (#41718) 2026-09-03 07:33:05 +00:00
provider
rag-pipeline Merge remote-tracking branch 'origin/main' into deploy/konwledge 2026-09-02 10:31:10 +08:00
share/text-generation chore(web): canonicalize Tailwind classes (#41718) 2026-09-03 07:33:05 +00:00
signin feat: add trunstile (#40494) 2026-08-12 03:08:19 +00:00
snippet-list chore(web): canonicalize Tailwind classes (#41718) 2026-09-03 07:33:05 +00:00
snippets Merge remote-tracking branch 'origin/main' into deploy/konwledge 2026-09-02 21:56:53 +08:00
step-by-step-tour refactor(dify-ui): simplify overlay content APIs (#41098) 2026-08-22 23:54:08 +00:00
tools chore(web): canonicalize Tailwind classes (#41718) 2026-09-03 07:33:05 +00:00
workflow Merge remote-tracking branch 'origin/main' into deploy/konwledge 2026-09-03 16:32:30 +08:00
workflow-app style(workflow): format available node filter 2026-09-02 20:51:23 +08:00
external-attribution-recorder.tsx fix: separate WebApp analytics from console page tracking (#41251) 2026-08-26 03:02:38 +00:00
full-screen-loading.tsx
oauth-registration-analytics.tsx fix(web): make registration tracking consent-safe and retryable (#41365) 2026-08-31 03:39:37 +00:00