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

Add support for new SMTP config schema #382

Merged
merged 7 commits into from
Dec 5, 2024
Merged

Add support for new SMTP config schema #382

merged 7 commits into from
Dec 5, 2024

Conversation

jaclarke
Copy link
Member

@jaclarke jaclarke commented Nov 27, 2024

Adds support for the new SMTP config introduced in edgedb/edgedb#7942.

image

@scotttrinh I'm not sure how the cloud magic smtp provider will be introspected, is it going to be a another type extending cfg::EmailProvider that won't be user configurable, or is it another SMTPProviderConfig which we have to make readonly in the UI?

Also there's a new potential tripping hazard when updating an existing smtp provider, as I think we now have to update the whole config object, so that will reset the password every time unless you re-enter the password whenever you make a change.
Disabled editing of smtp configs for now.
Re-enabled smtp config editing, but with a warning message if you don't re-enter the password.

@jaclarke jaclarke requested a review from scotttrinh November 27, 2024 22:10
Comment on lines 58 to 59
<span>Warning:</span> You have enabled auth providers
requiring email, but no SMTP provider is configured.
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a bit more complicated than this since you might avoid configuring SMTP and just use webhooks.

Copy link
Contributor

Choose a reason for hiding this comment

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

Now that I think of it, we should have an opt-out option which sets the pointer to {} without losing your config.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I've updated the warnings to be more specific and also take into account webhook config. And added a button deselect the currently enabled smtp provider.

@jaclarke jaclarke requested a review from scotttrinh December 4, 2024 21:33
Comment on lines +253 to +255
<span>Warning:</span> You have not entered a password. If there
is an existing password, it will be deleted when you update
this SMTP provider unless you re-enter the password above.
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, this seems fine!

);

return {
verificationNoSmtp: emailVerification && !smtpConfigured,
Copy link
Contributor

Choose a reason for hiding this comment

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

@jaclarke jaclarke requested a review from scotttrinh December 5, 2024 20:36
@jaclarke jaclarke merged commit dc71b06 into main Dec 5, 2024
1 of 2 checks passed
@jaclarke jaclarke deleted the smtp-update branch December 5, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants