From 6611c17031c6745fc485b608402a7dfc9974e681 Mon Sep 17 00:00:00 2001 From: John Davis Date: Fri, 10 Jan 2025 17:33:56 -0500 Subject: [PATCH] Do not display public and shared workflows authored by deleted users --- lib/galaxy/managers/workflows.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/galaxy/managers/workflows.py b/lib/galaxy/managers/workflows.py index ecb0b7a719ae..e7ad9fc98413 100644 --- a/lib/galaxy/managers/workflows.py +++ b/lib/galaxy/managers/workflows.py @@ -197,6 +197,11 @@ def index_query( filters.append(StoredWorkflow.published == true()) stmt = select(StoredWorkflow) + + # Do not include workflows authored by deleted users + if show_published or show_shared: + stmt = stmt.join(StoredWorkflow.user).where(and_(User.deleted == false(), User.purged == false())) + if show_shared: stmt = stmt.outerjoin(StoredWorkflow.users_shared_with) stmt = stmt.outerjoin(StoredWorkflow.tags)