diff --git a/lib/galaxy/managers/context.py b/lib/galaxy/managers/context.py index 24c29567a80b..e1fab11b2ea9 100644 --- a/lib/galaxy/managers/context.py +++ b/lib/galaxy/managers/context.py @@ -256,7 +256,7 @@ def user_can_do_run_as(self) -> bool: @property def user_is_active(self) -> bool: - return not self.app.config.user_activation_on or self.user is None or self.user.active + return not self.app.config.user_activation_on or (self.user is not None and self.user.active) def check_user_activation(self): """If user activation is enabled and the user is not activated throw an exception.""" diff --git a/lib/galaxy/webapps/galaxy/services/workflows.py b/lib/galaxy/webapps/galaxy/services/workflows.py index 52e35d96c8fe..3f8510e84b23 100644 --- a/lib/galaxy/webapps/galaxy/services/workflows.py +++ b/lib/galaxy/webapps/galaxy/services/workflows.py @@ -124,6 +124,7 @@ def invoke_workflow( workflow_id, payload: InvokeWorkflowPayload, ) -> Union[WorkflowInvocationResponse, List[WorkflowInvocationResponse]]: + trans.check_user_activation() # 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)