]> source.dussan.org Git - redmine.git/commitdiff
Code cleanup: RuboCop: Fix Style/RedundantReturn in app/models/user.rb
authorGo MAEDA <maeda@farend.jp>
Sun, 25 Aug 2019 16:15:36 +0000 (16:15 +0000)
committerGo MAEDA <maeda@farend.jp>
Sun, 25 Aug 2019 16:15:36 +0000 (16:15 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18394 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/user.rb

index 096adc4a9dd6955414964a5f829474c1c1a05b00..9003b253f2d16d4f2f3441b6849e5905119d8391 100644 (file)
@@ -342,8 +342,7 @@ class User < Principal
 
   # Does the backend storage allow this user to change their password?
   def change_password_allowed?
-    return true if auth_source.nil?
-    return auth_source.allow_password_changes?
+    auth_source.nil? ? true : auth_source.allow_password_changes?
   end
 
   # Returns true if the user password has expired