feat: enable all users to create platform team (#17707)
* add extra checks for platform to make sure user is genuine * make slug unique for every team
This commit is contained in:
1 parent
0f3773d724
commit
f743db9eaa
2 files changed
+13
-2
No files matched your search
@@ -5,6 +5,7 @@ import { useSession, signIn } from "next-auth/react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
import { uuid } from "short-uuid";
|
||||
|
||||
import { deriveOrgNameFromEmail } from "@calcom/ee/organizations/components/CreateANewOrganizationForm";
|
||||
import { deriveSlugFromEmail } from "@calcom/ee/organizations/components/CreateANewOrganizationForm";
|
||||
@@ -89,7 +90,7 @@ const CreateANewPlatformFormChild = ({ session }: { session: Ensure<SessionConte
|
||||
setServerErrorMessage(null);
|
||||
createOrganizationMutation.mutate({
|
||||
...v,
|
||||
slug: `${v.name.toLocaleLowerCase()}_platform`,
|
||||
slug: `${v.name.toLocaleLowerCase()}-platform-${uuid().substring(0, 20)}`,
|
||||
});
|
||||
}
|
||||
}}>
|
||||
|
||||
Reference in new issue
Block a user