// SPDX-License-Identifier: LicenseRef-ConusAI-Template-1.0 // The organization's own settings. `tenancy.org.update` needs the admin role, so the page asks for // it (src/server/guard.ts): a member below it gets the forbidden page, a stranger the not-found // page. Workspaces are created on their own page (`/{org}/workspaces`). import { settingsGet } from "@app/modules/knowledge" import { SettingsSection } from "@app/modules/knowledge/ui" import { orgGet } from "@conusai-kit/tenancy" import type { ReactElement } from "react" import { orFallback, requireRole } from "../../../src/server/guard" import { pageContext } from "../../../src/server/page" export const dynamic = "force-dynamic" export default async function Settings({ params }: { params: Promise<{ org: string }> }): Promise { const { org } = await params const page = await pageContext() const { caller, i18n, path } = page await requireRole(page, org, "admin") const organization = await orFallback(path, () => caller.call(orgGet, { org })) const knowledge = await orFallback(path, () => caller.call(settingsGet, { org })) // The request's i18n already carries every module's catalogue (kit-i18n merges them from the // manifests), so the module's own keys resolve with no import of its messages here. const t = (key: string) => i18n.message(`knowledge.${key}`) return ( <>

{i18n.message("app.settings")}

{i18n.message("app.name")}
{organization.name}
{i18n.message("app.slug")}
{organization.slug}
{i18n.message("app.status")}
{organization.status}

{i18n.message("app.workspaces")}

) }