diff --git a/lib/galaxy/webapps/base/webapp.py b/lib/galaxy/webapps/base/webapp.py index b9430a3774c0..b9bd9eb717ce 100644 --- a/lib/galaxy/webapps/base/webapp.py +++ b/lib/galaxy/webapps/base/webapp.py @@ -932,6 +932,10 @@ def get_or_create_default_history(self): self.set_history(history) return history + # Don't create new history if login required and user is anonymous + if self.app.config.require_login and not self.user: + return None + # No suitable history found, create a new one. return self.new_history()