mirror of
https://github.com/langgenius/dify.git
synced 2026-09-08 11:04:27 +08:00
tighten workflow room app lookup
This commit is contained in:
parent
dfcf7f3a11
commit
5fcda1aaac
@ -80,7 +80,7 @@ class WorkflowCollaborationService:
|
|||||||
def _can_access_workflow(self, workflow_id: str, tenant_id: str) -> bool:
|
def _can_access_workflow(self, workflow_id: str, tenant_id: str) -> bool:
|
||||||
"""Check that the collaboration room belongs to an active app in the caller's current tenant."""
|
"""Check that the collaboration room belongs to an active app in the caller's current tenant."""
|
||||||
app_id = db.session.scalar(
|
app_id = db.session.scalar(
|
||||||
select(App.id).where(App.id == workflow_id, App.tenant_id == tenant_id).limit(1)
|
select(App.id).where(App.id == workflow_id, App.tenant_id == tenant_id, App.status == "normal").limit(1)
|
||||||
)
|
)
|
||||||
return app_id is not None
|
return app_id is not None
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user