Resolve "Change redirect page if password expired"
What does this MR do and why?
Change redirect page if password expired.
-
Web UI reset password interface should use email notification reset password interface.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
rails console
- Login root and enable password_expiration.
a = ApplicationSetting.first
a.password_expiration_enabled = true
a.password_expires_notice_before_days = 7
a.password_expires_in_days = 90
a.save
::Feature.enable(:password_expiration)
- Set both
password_expires_at
andpassword_last_changed_at
to expire.
u = User.first
u.password_expires_at = 1.day.ago
u.user_detail.password_last_changed_at = 91.days.ago
u.save
- Click anywhere in the UI, and see
admin set password expired
feature's reset password page instead of notification reset password page to ensure theadmin set password expired
feature takes precedence over thepassword expiration
feature - Only set
password_last_changed_at
to expire.
u = User.first
u.user_detail.password_last_changed_at = 91.days.ago
u.save
- Click anywhere in the UI, and see notification reset password page
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Closes #2153 (closed)
由 奇廷 陈 编辑于