Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Gutenlypso: Disable the Publish button if the email is unverified #29594
Gutenlypso: Disable the Publish button if the email is unverified #29594
Changes from 1 commit
7373a55
2441771
d5d6164
8edfc00
3865b41
7939fe6
492ab33
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing the PR I've got into a funny case that somehow "breaks" these checks.
This is correct: we allow unverified users to publish, as long as their site is not yet public.
Though, to launch a site, the user first needs to verify their email.
So, I wonder: when can it happen that a user has both a verified email and an unlaunched site—or viceversa?
Those two cases would be the only two that would enable the whole
userNeedsVerification
flow, with the warning and the dialog, etc. (in both Gutenberg and Classic)cc @scruffian for adding
isUnlaunchedSite
to the equivalent of this inEditorGroundControl
in #27962.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's possible for a user to have an unlaunched site and a verified email address. Since the process to launch a site would be to first verify the email address and then launch the site, any users who are part way through that process will be in that state.
The reverse state should be impossible - we should never allow users with unverified email addresses to launch a site.
Does that answer your question?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely yes, thank you very much @scruffian!
I didn't proceed with the test
because I'm that lazyto keep the user email unverified, and somehow just assumed verifying the email would also automatically launch (which would definitely be odd).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Sorry for the delay from my previous answer, I just now got to test it)
So, what happens then is that:
In other words, this would never be true:
In other words, we don't need the unverified email notice and the logic that prevents publishing a post, for both Guten and Classic.
Am I wrong on this?
Like, it's almost EOD and I've got the flu, I might very well have missed something. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not true. According to #27962, only private sites are unlaunched, so an unverified user can have a launched site if it is public.
This file was deleted.