Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Support adding a non-existent email as the owner of the organization #14569

Conversation

hariombalhara
Copy link
Member

@hariombalhara hariombalhara commented Apr 13, 2024

What does this PR do?

Fixes #14779
Fixes CAL-3566

Loom(https://www.loom.com/share/2da4f13d16874639ba66cf174052b7bb)

Also, now if a user can't be invited, an error is shown instead of silently ignoring the problem

Type of change

  • New feature (non-breaking change which adds functionality)

How should this be tested?

  • Go to settings/organizations/new and provide an email that doesn't exist in DB yet
  • Go with the flow

Automated Tests

  1. Added a test to verify the new flow.
  2. Modified existing test that creates an organization for existing user to verify emails as well.

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Copy link

vercel bot commented Apr 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
platform-starter-kit ❌ Failed (Inspect) May 5, 2024 9:15pm
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ai ⬜️ Ignored (Inspect) Visit Preview May 5, 2024 9:15pm
cal ⬜️ Ignored (Inspect) Visit Preview May 5, 2024 9:15pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview May 5, 2024 9:15pm
qa-not-in-use ⬜️ Ignored (Inspect) Visit Preview May 5, 2024 9:15pm

@github-actions github-actions bot added the ❗️ migrations contains migration files label Apr 13, 2024
Copy link
Contributor

github-actions bot commented Apr 13, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @hariombalhara and the rest of your teammates on Graphite Graphite

Copy link
Contributor

github-actions bot commented Apr 13, 2024

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link

deploysentinel bot commented Apr 13, 2024

No failed tests 🎉

…ing_an_non-existent_email_as_the_owner_of_the_organization
…ing_an_non-existent_email_as_the_owner_of_the_organization
Copy link

linear bot commented Apr 27, 2024

Copy link
Contributor

@joeauyeung joeauyeung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work so far @hariombalhara.

I would say the only blocking comment I have is around user creation. Other than that all my other comments are non-blocking.

Non-blocking

If there is no name, maybe we don't include the "Hi, {email}". Feels weird
image

If the user didn't exist before, can we add the email verification link in this email as well?
image

hariombalhara and others added 3 commits May 3, 2024 12:24
…er.ts

Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
…existent_email_as_the_owner_of_the_organization' into 04-13-fix_support_adding_an_non-existent_email_as_the_owner_of_the_organization
@hariombalhara
Copy link
Member Author

hariombalhara commented May 3, 2024

If there is no name, maybe we don't include the "Hi, {email}". Feels weird

I think you meant 'Hi, {username}'. This is an existing verification email and we send username only in there. Could be an improvement though.

If the user didn't exist before, can we add the email verification link in this email as well?

I wanted to keep the approach simple. This would complicate the organization creation email more. We can certainly do it if needed later.

Copy link
Contributor

@joeauyeung joeauyeung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments have been resolved or are out of scope for this PR. As always a great discussion @hariombalhara

@hariombalhara hariombalhara enabled auto-merge (squash) May 6, 2024 07:04
@hariombalhara hariombalhara merged commit 3a0c766 into main May 6, 2024
41 checks passed
@hariombalhara hariombalhara deleted the 04-13-fix_support_adding_an_non-existent_email_as_the_owner_of_the_organization branch May 6, 2024 07:09
@shirazdole
Copy link
Member

Nice! Does this extend to Platform as well? cc @hariombalhara (can someone tag Morgan idk his github name lol) or do we still have to make sure Platform users create an account?

@hariombalhara
Copy link
Member Author

cc @ThyMinimalDev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consumer core area: core, team members only emails area: emails, cancellation email, reschedule email, inbox, spam folder, not getting email ✨ feature New feature or request High priority Created by Linear-GitHub Sync ❗️ migrations contains migration files organizations area: organizations, orgs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-3566] Allow admin to create an organization with a non-existent user
5 participants