core: show last password change date (#12958)
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -236,9 +236,11 @@ class UserSerializer(ModelSerializer):
|
|||||||
"path",
|
"path",
|
||||||
"type",
|
"type",
|
||||||
"uuid",
|
"uuid",
|
||||||
|
"password_change_date",
|
||||||
]
|
]
|
||||||
extra_kwargs = {
|
extra_kwargs = {
|
||||||
"name": {"allow_blank": True},
|
"name": {"allow_blank": True},
|
||||||
|
"password_change_date": {"read_only": True},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -56494,11 +56494,16 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
format: uuid
|
format: uuid
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
password_change_date:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
readOnly: true
|
||||||
required:
|
required:
|
||||||
- avatar
|
- avatar
|
||||||
- groups_obj
|
- groups_obj
|
||||||
- is_superuser
|
- is_superuser
|
||||||
- name
|
- name
|
||||||
|
- password_change_date
|
||||||
- pk
|
- pk
|
||||||
- uid
|
- uid
|
||||||
- username
|
- username
|
||||||
|
@ -158,6 +158,10 @@ export class UserViewPage extends WithCapabilitiesConfig(AKElement) {
|
|||||||
? html`<div>${getRelativeTime(user.lastLogin)}</div>
|
? html`<div>${getRelativeTime(user.lastLogin)}</div>
|
||||||
<small>${user.lastLogin.toLocaleString()}</small>`
|
<small>${user.lastLogin.toLocaleString()}</small>`
|
||||||
: html`${msg("-")}`],
|
: 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("Active"), html`<ak-status-label type="warning" ?good=${user.isActive}></ak-status-label>`],
|
||||||
[msg("Type"), userTypeToLabel(user.type)],
|
[msg("Type"), userTypeToLabel(user.type)],
|
||||||
[msg("Superuser"), html`<ak-status-label type="warning" ?good=${user.isSuperuser}></ak-status-label>`],
|
[msg("Superuser"), html`<ak-status-label type="warning" ?good=${user.isSuperuser}></ak-status-label>`],
|
||||||
|
Reference in New Issue
Block a user