fix: Organization Signup when the username is already taken by someone else outside the organization#13506
fix: Organization Signup when the username is already taken by someone else outside the organization#13506
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Ignored Deployments
|
|
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
|
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link. |
eb0cfc0 to
fc6a1d3
Compare
fc6a1d3 to
e5e149b
Compare
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
| where: { | ||
| username, | ||
| // Simply remove it when we drop organizationId column | ||
| organizationId: null, | ||
| }, | ||
| select: { | ||
| id: true, | ||
| username: true, | ||
| }, | ||
| }); | ||
|
|
||
| if (user) { | ||
| response.available = false; | ||
| } | ||
|
|
||
| if (await isPremiumUserName(username)) { | ||
| response.premium = true; | ||
| } | ||
|
|
||
| // get list of similar usernames in the db | ||
| const users = await prisma.user.findMany({ | ||
| where: { | ||
| username: { | ||
| contains: username, | ||
| }, | ||
| }, | ||
| select: { | ||
| username: true, | ||
| }, | ||
| }); | ||
|
|
||
| // We only need suggestedUsername if the username is not available | ||
| if (!response.available) { | ||
| response.suggestedUsername = await generateUsernameSuggestion( | ||
| users.map((user) => user.username).filter(notEmpty), | ||
| username | ||
| ); | ||
| } | ||
|
|
There was a problem hiding this comment.
Reverted usernameCheck back to it's previous state and introduced usernameCheckForSignup for the signup specific use case where an already created user is being allowed to signup so that he can set his password. Note that the user is created as soon as he is invited.
Current Playwright Test Results Summary✅ 439 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 02/02/2024 03:15:56pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 1a92d66 Started: 02/02/2024 03:05:36pm UTC
|
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Booking With Long Text Question and Each Other Question Booking With Long Text Question and checkbox Question Long Text and checkbox required
Retry 1 • Initial Attempt |
0% (0)0 / 228 runsfailed over last 7 days |
2.63% (6)6 / 228 runsflaked over last 7 days |
📄 apps/web/playwright/booking/selectQuestion.e2e.ts • 2 Flakes
Top 1 Common Error Messages
|
|
2 Test Cases Affected |
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Booking With Phone Question and Each Other Question Booking With Select Question and checkbox group Question Select required and checkbox group required
Retry 1 • Initial Attempt |
0% (0)0 / 216 runsfailed over last 7 days |
3.70% (8)8 / 216 runsflaked over last 7 days |
|
Booking With Phone Question and Each Other Question Booking With Select Question and Multi email Question Select and Multi email not required
Retry 1 • Initial Attempt |
0% (0)0 / 213 runsfailed over last 7 days |
1.88% (4)4 / 213 runsflaked over last 7 days |
📄 apps/web/playwright/booking/checkboxGroupQuestion.e2e.ts • 3 Flakes
Top 1 Common Error Messages
|
|
3 Test Cases Affected |
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Booking With Checkbox Group Question and Each Other Question Booking With Checkbox Group Question and Address Question Booking With Checkbox Group Question and multiselect Question Checkbox Group required and multiselect text required
Retry 1 • Initial Attempt |
0% (0)0 / 234 runsfailed over last 7 days |
5.56% (13)13 / 234 runsflaked over last 7 days |
|
Booking With Checkbox Group Question and Each Other Question Booking With Checkbox Group Question and Address Question Booking With Checkbox Group Question and Number Question Checkbox Group and Number not required
Retry 1 • Initial Attempt |
1.28% (3)3 / 234 runsfailed over last 7 days |
3.42% (8)8 / 234 runsflaked over last 7 days |
|
Booking With Checkbox Group Question and Each Other Question Booking With Checkbox Group Question and Address Question Booking With Checkbox Group Question and select Question Checkbox Group required and select required
Retry 1 • Initial Attempt |
0.87% (2)2 / 231 runsfailed over last 7 days |
6.49% (15)15 / 231 runsflaked over last 7 days |
📄 apps/web/playwright/booking/radioGroupQuestion.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Booking With Radio Question and Each Other Question Booking With Radio Question and Address Question Booking With Radio Question and Number Question Radio and Number not required
Retry 1 • Initial Attempt |
0.45% (1)1 / 223 runfailed over last 7 days |
4.04% (9)9 / 223 runsflaked over last 7 days |
📄 apps/web/playwright/insights.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Insights should be able to switch between memberUsers
Retry 1 • Initial Attempt |
0.44% (1)1 / 228 runfailed over last 7 days |
0.44% (1)1 / 228 runflaked over last 7 days |
📄 apps/web/playwright/booking/addressQuestione2e/addressQuestion.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Booking With Address Question and Each Other Question Booking With Address Question and Multi email Question Address and Multi email not required
Retry 1 • Initial Attempt |
0% (0)0 / 240 runsfailed over last 7 days |
4.17% (10)10 / 240 runsflaked over last 7 days |
📄 apps/web/playwright/signup.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Signup Flow Test Signup with valid (non premium) username
Retry 1 • Initial Attempt |
1.21% (3)3 / 247 runsfailed over last 7 days |
4.05% (10)10 / 247 runsflaked over last 7 days |
📄 apps/web/playwright/booking/multipleEmailQuestion.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Booking With Multiple Email Question and Each Other Question Booking With Multiple Email Question and Long text Question Multiple Email required and Long text required
Retry 1 • Initial Attempt |
0.43% (1)1 / 235 runfailed over last 7 days |
4.68% (11)11 / 235 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 8 Flakes
Top 1 Common Error Messages
|
|
8 Test Cases Affected |
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Popup Tests should open embed iframe on click - Configured with light theme
Retry 1 • Initial Attempt |
-2.87% (-7)-7 / 244 runsfailed over last 7 days |
45.49% (111)111 / 244 runsflaked over last 7 days |
|
Popup Tests should be able to reschedule
Retry 1 • Initial Attempt |
-79.86% (-111)-111 / 139 runsfailed over last 7 days |
79.86% (111)111 / 139 runsflaked over last 7 days |
|
Popup Tests should open Routing Forms embed on click
Retry 1 • Initial Attempt |
-69.78% (-97)-97 / 139 runsfailed over last 7 days |
72.66% (101)101 / 139 runsflaked over last 7 days |
|
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when no theme is configured through Embed API
Retry 1 • Initial Attempt |
-74.81% (-101)-101 / 135 runsfailed over last 7 days |
74.81% (101)101 / 135 runsflaked over last 7 days |
|
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when configured with 'auto' theme using Embed API
Retry 1 • Initial Attempt |
-74.81% (-101)-101 / 135 runsfailed over last 7 days |
74.81% (101)101 / 135 runsflaked over last 7 days |
|
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe(Booker Profile Page) with dark theme when configured with dark theme using Embed API
Retry 1 • Initial Attempt |
-74.81% (-101)-101 / 135 runsfailed over last 7 days |
74.81% (101)101 / 135 runsflaked over last 7 days |
|
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe(Event Booking Page) with dark theme when configured with dark theme using Embed API
Retry 1 • Initial Attempt |
-74.07% (-100)-100 / 135 runsfailed over last 7 days |
74.07% (100)100 / 135 runsflaked over last 7 days |
|
Popup Tests prendered embed should be loaded and apply the config given to it
Retry 1 • Initial Attempt |
-74.07% (-100)-100 / 135 runsfailed over last 7 days |
74.07% (100)100 / 135 runsflaked over last 7 days |
📄 apps/web/playwright/embed-code-generator.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Embed Code Generator Tests Non-Organization Event Types Page open Embed Dialog and choose element-click for First Event Type
Retry 1 • Initial Attempt |
0.41% (1)1 / 245 runfailed over last 7 days |
7.35% (18)18 / 245 runsflaked over last 7 days |
📄 apps/web/playwright/organization/organization-invitation.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Organization Email matching orgAutoAcceptEmail and a Verified Organization Team Invitation
Retry 1 • Initial Attempt |
1.75% (4)4 / 229 runsfailed over last 7 days |
13.10% (30)30 / 229 runsflaked over last 7 days |
📄 apps/web/playwright/organization/across-org/across-org.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
user1NotMemberOfOrg1 is part of team1MemberOfOrg1 Team1 profile should show correct domain if logged in as User1
Retry 1 • Initial Attempt |
0% (0)0 / 234 runsfailed over last 7 days |
1.71% (4)4 / 234 runsflaked over last 7 days |

What does this PR do?
Fixes #13508
Type of change
How should this be tested?
Mandatory Tasks
Checklist