diff --git a/web/src/admin/AdminInterface/AdminSidebar.ts b/web/src/admin/AdminInterface/AdminSidebar.ts index 79035aa9bc..b4c0d7edc9 100644 --- a/web/src/admin/AdminInterface/AdminSidebar.ts +++ b/web/src/admin/AdminInterface/AdminSidebar.ts @@ -166,7 +166,7 @@ export class AkAdminSidebar extends WithCapabilitiesConfig(AKElement) { ${this.renderNewVersionMessage()} ${this.renderImpersonationMessage()} ${map(sidebarContent, renderOneSidebarItem)} - ${this.renderEnterpriseMessage()} + ${this.renderEnterpriseMenu()} `; } @@ -199,7 +199,7 @@ export class AkAdminSidebar extends WithCapabilitiesConfig(AKElement) { : nothing; } - renderEnterpriseMessage() { + renderEnterpriseMenu() { return this.can(CapabilitiesEnum.IsEnterprise) ? html` diff --git a/web/src/elements/Interface/ConfigContextController.ts b/web/src/elements/Interface/ConfigContextController.ts index b9cf088f81..8e16d0b8dc 100644 --- a/web/src/elements/Interface/ConfigContextController.ts +++ b/web/src/elements/Interface/ConfigContextController.ts @@ -1,5 +1,6 @@ import { EVENT_REFRESH } from "@goauthentik/authentik/common/constants"; import { DEFAULT_CONFIG } from "@goauthentik/common/api/config"; +import { globalAK } from "@goauthentik/common/global"; import { authentikConfigContext } from "@goauthentik/elements/AuthentikContexts"; import { ContextProvider } from "@lit/context"; @@ -23,6 +24,9 @@ export class ConfigContextController implements ReactiveController { context: authentikConfigContext, initialValue: undefined, }); + // Pre-hydrate from template-embedded config + this.context.setValue(globalAK().config); + this.host.config = globalAK().config; this.fetch = this.fetch.bind(this); this.fetch(); }