Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Sync same logic for datasets. (#27056)

Eric Guo5937a66e226f
diff --git a/api/controllers/console/datasets/datasets.py b/api/controllers/console/datasets/datasets.py
index c03767d2e6d..4a9e0789fb8 100644
--- a/api/controllers/console/datasets/datasets.py
+++ b/api/controllers/console/datasets/datasets.py
@@ -468,7 +468,6 @@ class DatasetApi(Resource):
dataset_id_str = str(dataset_id)
current_user, _ = current_account_with_tenant()
- # The role of the current user in the ta table must be admin, owner, or editor
if not (current_user.has_edit_permission or current_user.is_dataset_operator):
raise Forbidden()
diff --git a/api/controllers/console/datasets/external.py b/api/controllers/console/datasets/external.py
index f5909191808..1ebd7101e4b 100644
--- a/api/controllers/console/datasets/external.py
+++ b/api/controllers/console/datasets/external.py
@@ -150,7 +150,6 @@ class ExternalApiTemplateApi(Resource):
current_user, current_tenant_id = current_account_with_tenant()
external_knowledge_api_id = str(external_knowledge_api_id)
- # The role of the current user in the ta table must be admin, owner, or editor
if not (current_user.has_edit_permission or current_user.is_dataset_operator):
raise Forbidden()
diff --git a/api/controllers/console/datasets/rag_pipeline/rag_pipeline_workflow.py b/api/controllers/console/datasets/rag_pipeline/rag_pipeline_workflow.py
index d4d6da7fe2a..77dcf30a78a 100644
--- a/api/controllers/console/datasets/rag_pipeline/rag_pipeline_workflow.py
+++ b/api/controllers/console/datasets/rag_pipeline/rag_pipeline_workflow.py
@@ -937,11 +937,10 @@ class RagPipelineTransformApi(Resource):
@setup_required
@login_required
@account_initialization_required
- @edit_permission_required
def post(self, dataset_id: str):
current_user, _ = current_account_with_tenant()
- if not current_user.is_dataset_operator:
+ if not (current_user.has_edit_permission or current_user.is_dataset_operator):
raise Forbidden()
dataset_id = str(dataset_id)