Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

Added condition to check adapter is shared to org in static tools (#364)

Rahul Johnyf7675c6d6c38
diff --git a/backend/tool_instance/tool_instance_helper.py b/backend/tool_instance/tool_instance_helper.py
index a261fcc29..85c729c79 100644
--- a/backend/tool_instance/tool_instance_helper.py
+++ b/backend/tool_instance/tool_instance_helper.py
@@ -416,7 +416,8 @@ class ToolInstanceHelper:
raise PermissionDenied(error_msg)
if not (
- adapter_instance.created_by == user
+ adapter_instance.shared_to_org
+ or adapter_instance.created_by == user
or adapter_instance.shared_users.filter(pk=user.pk).exists()
):
logger.error(