Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

anonymous is now active so we have to change this

Markus Kahld55fa39abbd6
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index 3e1a666c1a6..9c314fb7824 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -351,7 +351,10 @@ class AccountController < ApplicationController
redirect_to direct_login_provider_url(ps)
elsif Setting.login_required?
- error = user.active? || flash[:error]
+ # I'm not sure why it is considered an error if we don't have the anonymous user here.
+ # Before the line read `user.active? || flash[:error]` but since a recent
+ # change the anonymous user is active too which breaks this.
+ error = !user.anonymous? || flash[:error]
instructions = error ? :after_error : :after_registration
render :exit, locals: { instructions: instructions }