List, switch off/on and delete Authentik users
Apps → Authentik gets a Users section for administrators: a searchable list of people (service accounts left out) with status, administrator and last sign-in, and Switch off / Switch on / Delete. Switching off sends only is_active; deleting needs the user name typed and re-checked by the server. The server refuses service accounts, the account the token belongs to and the last active administrator. Each action is audited. The token field is now "Token for making and managing users". Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
aa95d6b314
commit
0cd11268ee
12 files changed
+733
-21
No files matched your search
@@ -1771,6 +1771,18 @@ export interface AuthentikNewUser {
|
||||
groups: string[];
|
||||
}
|
||||
|
||||
/** A person in Authentik, as the list that looks after them shows them. */
|
||||
export interface AuthentikPerson {
|
||||
pk: number;
|
||||
username: string;
|
||||
name: string;
|
||||
email: string | null;
|
||||
active: boolean;
|
||||
/** May do everything in Authentik. */
|
||||
admin: boolean;
|
||||
lastLogin: string | null;
|
||||
}
|
||||
|
||||
/** A user Authentik made, and the one-time link for them to choose a password with (null, with the reason, when that could not be made). */
|
||||
export interface AuthentikUserMade {
|
||||
user: { pk: number; username: string; name: string };
|
||||
@@ -3412,6 +3424,9 @@ export const api = {
|
||||
list: () => request<{ authentiks: AuthentikInfo[] }>("/api/authentik"),
|
||||
groups: (id: number) => request<{ groups: AuthentikGroup[] }>(`/api/authentik/${id}/groups`),
|
||||
createUser: (id: number, body: AuthentikNewUser) => request<AuthentikUserMade>(`/api/authentik/${id}/users`, { method: "POST", body: JSON.stringify(body) }),
|
||||
users: (id: number, search = "") => request<{ users: AuthentikPerson[]; more: boolean; self: number | null }>(`/api/authentik/${id}/users${search.trim() ? `?search=${encodeURIComponent(search.trim())}` : ""}`),
|
||||
setUserActive: (id: number, pk: number, active: boolean) => request<{ user: AuthentikPerson }>(`/api/authentik/${id}/users/${pk}/active`, { method: "POST", body: JSON.stringify({ active }) }),
|
||||
deleteUser: (id: number, pk: number, username: string) => request<void>(`/api/authentik/${id}/users/${pk}`, { method: "DELETE", body: JSON.stringify({ username }) }),
|
||||
removeWriteToken: (id: number) => request<void>(`/api/authentik/${id}/write-token`, { method: "DELETE" }),
|
||||
},
|
||||
jellyfin: {
|
||||
|
||||
Reference in new issue
Block a user