Skip to content

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

  1. 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)
  1. Set both password_expires_at and password_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
  1. Click anywhere in the UI, and see admin set password expired feature's reset password page instead of notification reset password page to ensure the admin set password expired feature takes precedence over the password expiration feature image
  2. Only set password_last_changed_at to expire.
u = User.first
u.user_detail.password_last_changed_at = 91.days.ago
u.save
  1. Click anywhere in the UI, and see notification reset password page

image

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Closes #2153 (closed)

奇廷 陈 编辑于

合并请求报告

加载中