mirror of
https://github.com/langgenius/dify.git
synced 2026-09-05 00:31:19 +08:00
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 |
||
|---|---|---|
| .. | ||
| fixtures/workflow | ||
| helpers | ||
| integration_tests | ||
| test_containers_integration_tests | ||
| unit_tests | ||
| __init__.py | ||
| conftest.py | ||
| pytest_dify.py | ||
| seed_legacy_model_type_dirty_data.py | ||
| workflow_test_utils.py | ||