mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-25 12:01:04 +02:00
fix: fix org scoped access for resources
This commit is contained in:
parent
f3bcf24370
commit
e4b53f78e9
47 changed files with 2667 additions and 400 deletions
|
|
@ -606,11 +606,9 @@ class WorkflowClient(BaseDBClient):
|
|||
"""Get workflows by IDs for a specific organization"""
|
||||
async with self.async_session() as session:
|
||||
result = await session.execute(
|
||||
select(WorkflowModel)
|
||||
.join(WorkflowModel.user)
|
||||
.where(
|
||||
select(WorkflowModel).where(
|
||||
WorkflowModel.id.in_(workflow_ids),
|
||||
WorkflowModel.user.has(selected_organization_id=organization_id),
|
||||
WorkflowModel.organization_id == organization_id,
|
||||
)
|
||||
)
|
||||
return result.scalars().all()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue