web/common: disable API Drawer by default in user interface

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-10-24 21:54:14 +02:00
parent 6ea57921f2
commit 3da7fcfc1d
2 changed files with 8 additions and 1 deletions

View file

@ -80,5 +80,5 @@ export function currentInterface(): string {
if (pathMatches && pathMatches.length >= 2) {
currentInterface = pathMatches[1];
}
return currentInterface;
return currentInterface.toLowerCase();
}

View file

@ -1,3 +1,4 @@
import { currentInterface } from "@goauthentik/common/sentry";
import { me } from "@goauthentik/common/users";
import { UserSelf } from "@goauthentik/api";
@ -65,6 +66,12 @@ export class DefaultUIConfig implements UIConfig {
perPage: 20,
};
locale = "";
constructor() {
if (currentInterface() === "user") {
this.enabledFeatures.apiDrawer = false;
}
}
}
let globalUiConfig: Promise<UIConfig>;