mirror of https://github.com/langgenius/dify.git
Fix worng permission logic
This commit is contained in:
parent
9458ebe320
commit
ec87474d45
|
|
@ -339,7 +339,7 @@ class DatasetApi(Resource):
|
|||
dataset_id_str = str(dataset_id)
|
||||
|
||||
# The role of the current user in the ta table must be admin, owner, or editor
|
||||
if not current_user.is_editor or current_user.is_dataset_operator:
|
||||
if not (current_user.is_editor or current_user.is_dataset_operator):
|
||||
raise Forbidden()
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ class ExternalApiTemplateApi(Resource):
|
|||
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.is_editor or current_user.is_dataset_operator:
|
||||
if not (current_user.is_editor or current_user.is_dataset_operator):
|
||||
raise Forbidden()
|
||||
|
||||
ExternalDatasetService.delete_external_knowledge_api(current_user.current_tenant_id, external_knowledge_api_id)
|
||||
|
|
|
|||
Loading…
Reference in New Issue