From 7d72d2fa03a684c1a6c90f5f0e2adc04d32a3d4d Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Tue, 21 May 2024 10:22:49 -0500 Subject: [PATCH] [24.0] Prevent anonymous users from running workflows Fixes https://github.com/galaxyproject/galaxy/issues/18147 --- lib/galaxy/webapps/galaxy/services/workflows.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/galaxy/webapps/galaxy/services/workflows.py b/lib/galaxy/webapps/galaxy/services/workflows.py index 52e35d96c8fe..3cce4e906c6e 100644 --- a/lib/galaxy/webapps/galaxy/services/workflows.py +++ b/lib/galaxy/webapps/galaxy/services/workflows.py @@ -124,6 +124,8 @@ def invoke_workflow( workflow_id, payload: InvokeWorkflowPayload, ) -> Union[WorkflowInvocationResponse, List[WorkflowInvocationResponse]]: + if trans.anonymous: + raise exceptions.AuthenticationRequired("You need to be logged in to run workflows.") # Get workflow + accessibility check. by_stored_id = not payload.instance stored_workflow = self._workflows_manager.get_stored_accessible_workflow(trans, workflow_id, by_stored_id)