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
Fix rubocop offenses
Klaus Zanders596a0fb52bfe
diff --git a/app/models/user.rb b/app/models/user.rbindex bbeb4bce76c..dd3c1aaa3c3 100644--- a/app/models/user.rb+++ b/app/models/user.rb@@ -210,7 +210,7 @@ class User < Principal# Tries to authenticate a user in the database via external auth source# or password stored in the database- def self.try_authentication_for_existing_user(user, password, session = nil)+ def self.try_authentication_for_existing_user(user, password, session = nil) # rubocop:disable Metrics/PerceivedComplexityactivate_user! user, session if sessionreturn nil if !user.active? || OpenProject::Configuration.disable_password_login?@@ -255,7 +255,7 @@ class User < Principal# Returns the user who matches the given autologin +key+ or nildef self.try_to_autologin(key)- token = Token::AutoLogin.find_by_plaintext_value(key)+ token = Token::AutoLogin.find_by_plaintext_value(key) # rubocop:disable Rails/DynamicFindBy# Make sure there's only 1 token that matches the keyif token && ((token.created_at > Setting.autologin.to_i.day.ago) && token.user && token.user.active?)token.user@@ -525,7 +525,7 @@ class User < Principal# Returns the anonymous user. If the anonymous user does not exist, it is created. There can be only# one anonymous user per database.- def self.anonymous+ def self.anonymous # rubocop:disable Metrics/AbcSizeRequestStore[:anonymous_user] ||= beginanonymous_user = AnonymousUser.first@@ -675,6 +675,6 @@ class User < Principalenddef self.default_admin_account_changed?- !User.active.find_by_login("admin").try(:current_password).try(:matches_plaintext?, "admin")+ !User.active.find_by_login("admin").try(:current_password).try(:matches_plaintext?, "admin") # rubocop:disable Rails/DynamicFindByendend