Skip to content

Commit ec27e57

Browse files
shaohuzhang1wangdan-fit2cloud
andauthoredDec 10, 2024
fix: 文档导出权限错误 (#1807)
Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
1 parent 5e42dca commit ec27e57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎apps/dataset/views/document.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def put(self, request: Request, dataset_id: str, document_id: str):
236236
return result.success(
237237
DocumentSerializers.Operate(data={'document_id': document_id, 'dataset_id': dataset_id}).cancel(
238238
request.data
239-
))
239+
))
240240

241241
class Refresh(APIView):
242242
authentication_classes = [TokenAuth]
@@ -309,7 +309,7 @@ class Export(APIView):
309309
manual_parameters=DocumentSerializers.Operate.get_request_params_api(),
310310
tags=["知识库/文档"])
311311
@has_permissions(
312-
lambda r, k: Permission(group=Group.DATASET, operate=Operate.USE,
312+
lambda r, k: Permission(group=Group.DATASET, operate=Operate.MANAGE,
313313
dynamic_tag=k.get('dataset_id')))
314314
def get(self, request: Request, dataset_id: str, document_id: str):
315315
return DocumentSerializers.Operate(data={'document_id': document_id, 'dataset_id': dataset_id}).export()

0 commit comments

Comments
 (0)