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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#36559] remove outdated comment
Tobias Dillmann14181b167df0
diff --git a/app/controllers/concerns/accounts/current_user.rb b/app/controllers/concerns/accounts/current_user.rbindex a9aee2348f1..9659bea1e6f 100644--- a/app/controllers/concerns/accounts/current_user.rb+++ b/app/controllers/concerns/accounts/current_user.rb@@ -1,3 +1,5 @@+# frozen_string_literal: true+#-- copyright# OpenProject is an open source project management software.# Copyright (C) the OpenProject GmbH@@ -37,16 +39,6 @@ module Accounts::CurrentUserprotected- # The current user is a per-session kind of thing and session stuff is controller responsibility.- # A globally accessible User.current is a big code smell. When used incorrectly it allows getting- # the current user outside of a session scope, i.e. in the model layer, from mailers or- # in the console which doesn't make any sense. For model code that needs to be aware of the- # current user, i.e. when returning all visible projects for <somebody>, the controller should- # pass the current user to the model, instead of letting it fetch it by itself through- # `User.current`. This method acts as a reminder and wants to encourage you to use it.- # Project.visible_by actually allows the controller to pass in a user but it falls back- # to `User.current` and there are other places in the session-unaware codebase,- # that rely on `User.current`.def current_userUser.currentend