web/admin: add toggle to hide deactivated users (#5419)
* web/admin: add toggle to hide deactivated users Signed-off-by: Jens Langhammer <jens@goauthentik.io> * make default user path configurable Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -9,6 +9,8 @@ import {
|
||||
ResponseContext,
|
||||
} from "@goauthentik/api";
|
||||
|
||||
export const CSRFHeaderName = "X-authentik-CSRF";
|
||||
|
||||
export interface RequestInfo {
|
||||
method: string;
|
||||
path: string;
|
||||
@ -32,7 +34,7 @@ export class LoggingMiddleware implements Middleware {
|
||||
export class CSRFMiddleware implements Middleware {
|
||||
pre?(context: RequestContext): Promise<FetchParams | void> {
|
||||
// @ts-ignore
|
||||
context.init.headers["X-authentik-CSRF"] = getCookie("authentik_csrf");
|
||||
context.init.headers[CSRFHeaderName] = getCookie("authentik_csrf");
|
||||
return Promise.resolve(context);
|
||||
}
|
||||
}
|
||||
|
@ -43,6 +43,9 @@ export interface UIConfig {
|
||||
type: LayoutType;
|
||||
};
|
||||
locale: string;
|
||||
defaults: {
|
||||
userPath: string,
|
||||
},
|
||||
}
|
||||
|
||||
export class DefaultUIConfig implements UIConfig {
|
||||
@ -68,6 +71,9 @@ export class DefaultUIConfig implements UIConfig {
|
||||
perPage: 20,
|
||||
};
|
||||
locale = "";
|
||||
defaults = {
|
||||
userPath: "users",
|
||||
};
|
||||
|
||||
constructor() {
|
||||
if (currentInterface() === "user") {
|
||||
|
Reference in New Issue
Block a user