chore: disable dashboard for creating new platform accounts (#27052)
* chore: disable dashboard for creating new platform accounts * chore: remove page altogether
This commit is contained in:
1 parent
14e2fa6893
commit
72dc999108
2 files changed
-69
No files matched your search
@@ -1,39 +0,0 @@
|
||||
import { _generateMetadata } from "app/_utils";
|
||||
import { cookies, headers } from "next/headers";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
|
||||
import LicenseRequired from "~/ee/common/components/LicenseRequired";
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
|
||||
import { buildLegacyRequest } from "@lib/buildLegacyCtx";
|
||||
|
||||
import LegacyPage, { LayoutWrapper } from "~/settings/platform/new/create-new-view";
|
||||
|
||||
export const generateMetadata = async () =>
|
||||
await _generateMetadata(
|
||||
(t) => t("set_up_your_platform_organization"),
|
||||
(t) => t("platform_organization_description"),
|
||||
undefined,
|
||||
undefined,
|
||||
"/settings/platform/new"
|
||||
);
|
||||
|
||||
const ServerPage = async () => {
|
||||
const session = await getServerSession({ req: buildLegacyRequest(await headers(), await cookies()) });
|
||||
const callbackUrl = `${WEBAPP_URL}/settings/platform/new`;
|
||||
|
||||
if (!session?.user) {
|
||||
redirect(`/login?callbackUrl=${callbackUrl}`);
|
||||
}
|
||||
|
||||
return (
|
||||
<LayoutWrapper>
|
||||
<LicenseRequired>
|
||||
<LegacyPage />
|
||||
</LicenseRequired>
|
||||
</LayoutWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
export default ServerPage;
|
||||
Reference in new issue
Block a user