Unverified Commit bd4a5293 authored by Marius van den Beek's avatar Marius van den Beek Committed by GitHub
Browse files

Merge pull request #18319 from mvdbeek/skip_history_creation_with_require_login_true

[23.2] Skip new history creation if user is anonymous and login is required
parents 141ad317 6af41385
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -932,6 +932,10 @@ class GalaxyWebTransaction(base.DefaultWebTransaction, context.ProvidesHistoryCo
                    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()