summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-28 00:06:20 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-28 00:06:20 +0000
commite08eba1838cb749b8815c7da98a504ff97bcfb98 (patch)
tree0172bc4d205f59dd6f3722b27d53e6aa8abb5825 /app/models/user.rb
parentd4633b0e70ec39583ce0b13f277f990b216ac0d9 (diff)
downloadgitlab-ce-e08eba1838cb749b8815c7da98a504ff97bcfb98.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 66defb4c707..5711162aa1a 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1519,6 +1519,10 @@ class User < ApplicationRecord
todos.find_by(target: target, state: :pending)
end
+ def password_expired?
+ !!(password_expires_at && password_expires_at < Time.now)
+ end
+
# @deprecated
alias_method :owned_or_masters_groups, :owned_or_maintainers_groups