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",
|
||||
"type",
|
||||
"uuid",
|
||||
"password_change_date",
|
||||
]
|
||||
extra_kwargs = {
|
||||
"name": {"allow_blank": True},
|
||||
"password_change_date": {"read_only": True},
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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>`],
|
||||
|
Reference in New Issue
Block a user