core: show last password change date (#12958)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L.
2025-02-10 16:13:04 +01:00
committed by GitHub
parent 6185e7cdc7
commit 1f79b5acb7
3 changed files with 11 additions and 0 deletions

View File

@ -236,9 +236,11 @@ class UserSerializer(ModelSerializer):
"path",
"type",
"uuid",
"password_change_date",
]
extra_kwargs = {
"name": {"allow_blank": True},
"password_change_date": {"read_only": True},
}

View File

@ -56494,11 +56494,16 @@ components:
type: string
format: uuid
readOnly: true
password_change_date:
type: string
format: date-time
readOnly: true
required:
- avatar
- groups_obj
- is_superuser
- name
- password_change_date
- pk
- uid
- username

View File

@ -158,6 +158,10 @@ export class UserViewPage extends WithCapabilitiesConfig(AKElement) {
? html`<div>${getRelativeTime(user.lastLogin)}</div>
<small>${user.lastLogin.toLocaleString()}</small>`
: html`${msg("-")}`],
[msg("Last password change"), user.passwordChangeDate
? html`<div>${getRelativeTime(user.passwordChangeDate)}</div>
<small>${user.passwordChangeDate.toLocaleString()}</small>`
: html`${msg("-")}`],
[msg("Active"), html`<ak-status-label type="warning" ?good=${user.isActive}></ak-status-label>`],
[msg("Type"), userTypeToLabel(user.type)],
[msg("Superuser"), html`<ak-status-label type="warning" ?good=${user.isSuperuser}></ak-status-label>`],