web/common: disable API Drawer by default in user interface
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
6ea57921f2
commit
3da7fcfc1d
|
@ -80,5 +80,5 @@ export function currentInterface(): string {
|
||||||
if (pathMatches && pathMatches.length >= 2) {
|
if (pathMatches && pathMatches.length >= 2) {
|
||||||
currentInterface = pathMatches[1];
|
currentInterface = pathMatches[1];
|
||||||
}
|
}
|
||||||
return currentInterface;
|
return currentInterface.toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { currentInterface } from "@goauthentik/common/sentry";
|
||||||
import { me } from "@goauthentik/common/users";
|
import { me } from "@goauthentik/common/users";
|
||||||
|
|
||||||
import { UserSelf } from "@goauthentik/api";
|
import { UserSelf } from "@goauthentik/api";
|
||||||
|
@ -65,6 +66,12 @@ export class DefaultUIConfig implements UIConfig {
|
||||||
perPage: 20,
|
perPage: 20,
|
||||||
};
|
};
|
||||||
locale = "";
|
locale = "";
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
if (currentInterface() === "user") {
|
||||||
|
this.enabledFeatures.apiDrawer = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let globalUiConfig: Promise<UIConfig>;
|
let globalUiConfig: Promise<UIConfig>;
|
||||||
|
|
Reference in New Issue