Module: Workarea::User::Passwords
- Extended by:
- ActiveSupport::Concern
- Includes:
- ActiveModel::SecurePassword
- Included in:
- Workarea::User
- Defined in:
- app/models/workarea/user/passwords.rb
Instance Method Summary collapse
Instance Method Details
#force_password_change? ⇒ Boolean
26 27 28 29 30 31 |
# File 'app/models/workarea/user/passwords.rb', line 26 def force_password_change? return false unless admin? return false if password_changed_at.blank? password_changed_at <= Workarea.config.password_lifetime.ago end |
#required_password_strength ⇒ Object
22 23 24 |
# File 'app/models/workarea/user/passwords.rb', line 22 def required_password_strength admin? ? :strong : Workarea.config.password_strength end |