{% trans 'Name' %} | -{% trans 'Active' %} | -{% trans 'Last Login' %} | -- |
---|---|---|---|
-
-
- {{ user.username }}
- {{ user.name }}
- |
- - - {{ user.is_active }} - - | -- - {{ user.last_login }} - - | -
- |
-
%(link)s" % {"link": link}) ) - return redirect("authentik_admin:users") + return redirect("/") diff --git a/authentik/core/api/users.py b/authentik/core/api/users.py index e75d451da5..1159b3a7de 100644 --- a/authentik/core/api/users.py +++ b/authentik/core/api/users.py @@ -28,7 +28,16 @@ class UserSerializer(ModelSerializer): class Meta: model = User - fields = ["pk", "username", "name", "is_superuser", "email", "avatar"] + fields = [ + "pk", + "username", + "name", + "is_active", + "last_login", + "is_superuser", + "email", + "avatar", + ] class UserViewSet(ModelViewSet): diff --git a/swagger.yaml b/swagger.yaml index ad050bf704..d4d7622048 100755 --- a/swagger.yaml +++ b/swagger.yaml @@ -8156,6 +8156,16 @@ definitions: description: User's display name. type: string minLength: 1 + is_active: + title: Active + description: Designates whether this user should be treated as active. Unselect + this instead of deleting accounts. + type: boolean + last_login: + title: Last login + type: string + format: date-time + x-nullable: true is_superuser: title: Is superuser type: boolean diff --git a/web/src/api/Users.ts b/web/src/api/Users.ts index 196702bf28..6bf1a7604e 100644 --- a/web/src/api/Users.ts +++ b/web/src/api/Users.ts @@ -1,4 +1,4 @@ -import { DefaultClient, AKResponse } from "./Client"; +import { DefaultClient, AKResponse, QueryArguments } from "./Client"; let _globalMePromise: Promise