fix: User exists should account for deleted workspaces, closes #7793

This commit is contained in:
Tom Moor committed 2024-10-17 18:14:15 -04:00
1 parent f0add849f9
commit 9e54fd1bfb
1 file changed
+6
+6
View File
@@ -74,6 +74,12 @@ if (env.GOOGLE_CLIENT_ID && env.GOOGLE_CLIENT_SECRET) {
if (!domain && !team) {
const userExists = await User.count({
where: { email: profile.email.toLowerCase() },
include: [
{
association: "team",
required: true,
},
],
});
// Users cannot create a team with personal gmail accounts