Skip to content

Scheduling infrastructure for absolutely everyone.

no need for platform users to complete onboarding (#19449)

Rajiv Sahal258bc1d2b01c
diff --git a/packages/trpc/server/routers/viewer/organizations/create.handler.ts b/packages/trpc/server/routers/viewer/organizations/create.handler.ts
index cff3cc24b29..dc54f1cb36b 100644
--- a/packages/trpc/server/routers/viewer/organizations/create.handler.ts
+++ b/packages/trpc/server/routers/viewer/organizations/create.handler.ts
@@ -119,7 +119,6 @@ export const createHandler = async ({ input, ctx }: CreateOptions) => {
if (!loggedInUser) throw new TRPCError({ code: "UNAUTHORIZED", message: "You are not authorized." });
const IS_USER_ADMIN = loggedInUser.role === UserPermissionRole.ADMIN;
- const verifiedUser = loggedInUser.completedOnboarding && !!loggedInUser.emailVerified;
// We only allow creating an annual billing period if you are a system admin
const billingPeriod = (IS_USER_ADMIN ? billingPeriodRaw : BillingPeriod.MONTHLY) ?? BillingPeriod.MONTHLY;
@@ -135,13 +134,6 @@ export const createHandler = async ({ input, ctx }: CreateOptions) => {
});
}
- if (isPlatform && !verifiedUser) {
- throw new TRPCError({
- code: "FORBIDDEN",
- message: "You need to complete onboarding before creating a platform team",
- });
- }
-
if (isNotACompanyEmail(orgOwnerEmail) && !isPlatform) {
throw new TRPCError({ code: "BAD_REQUEST", message: "Use company email to create an organization" });
}