feat: Force users to change their passwords after 3/6/12 months (#3352)

* feat: Force users to change their passwords after 3/6/12 months

* feat: Check if the password has expired by using the last_change_password_time field added to the user table

* feat: Use the created_time field of the user table to aid password expiration checking

* feat: Rename variable
This commit is contained in:
Luckery
2024-11-19 21:06:52 +08:00
committed by GitHub
parent 596016456c
commit dff65eee20
5 changed files with 78 additions and 4 deletions

View File

@ -381,7 +381,13 @@ func CheckUserPassword(organization string, username string, password string, la
if err != nil {
return nil, err
}
err = checkPasswordExpired(user, lang)
if err != nil {
return nil, err
}
}
return user, nil
}