dify/api/services/enterprise
Jyong cce0d818cf feat(knowledge-fs): authorize spaces with the legacy dataset RBAC points
KnowledgeFS spaces used their own `knowledge_space_*` RBAC vocabulary, so
workspace roles configured for knowledge bases did not apply to them. Reuse
the legacy `dataset_*` permission points instead, following the mapping the
dataset console already applies:

- read      -> dataset_readonly
- create    -> dataset_create_and_management
- edit / document write -> dataset_edit
- delete    -> dataset_delete
- access config -> dataset_access_config
- query / research / trace detail -> dataset_retrieval_recall

The enterprise `/knowledge-fs/permission-keys/batch` lookup now answers in
that vocabulary and is translated back into the product capabilities the
console exposes as `permission_keys`, so the web stays unchanged; the
historical `knowledge_space_*` keys remain accepted during the transition.
Workspace-level checks send the mapped dataset scene with
`resource_type=dataset`, and the RBAC-disabled fallback grants every dataset
point KnowledgeFS consults.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015zw5G5SX3HmVfnZof6YWAc
2026-09-03 11:10:04 -04:00
..
__init__.py Feat/enterprise sso (#3602) 2024-04-18 17:33:32 +08:00
account_deletion_sync.py refactor(api): move account lifecycle into application services (#40438) 2026-08-21 08:05:43 +00:00
app_permitted_service.py feat: adding dify cli (#36348) 2026-05-26 01:12:36 +00:00
base.py fix: apply configured timeout to enterprise inner API requests (#39335) 2026-07-22 02:56:08 +00:00
enterprise_service.py refactor(api): extract web app access queries (#40482) 2026-08-19 10:34:36 +00:00
plugin_manager_service.py ci: add flag for linter (#37018) 2026-06-08 04:53:12 +00:00
rbac_service.py feat(knowledge-fs): authorize spaces with the legacy dataset RBAC points 2026-09-03 11:10:04 -04:00
workspace_sync.py feat: credential sync fix for enterprise edition (#30626) 2026-01-14 23:33:24 -08:00