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 unlaunched private sites #27962

Merged
merged 4 commits into from
Oct 23, 2018
Merged

Conversation

scruffian
Copy link
Member

@scruffian scruffian commented Oct 19, 2018

This PR lays the groundwork necessary for the "private by default" project. It works in combination with this server side patch: D19586-code.

There are more changes necessary to make it possible to launch the site from Calypso, but I wanted to keep this PR small.

Changes proposed in this Pull Request

  • Sites created using the site step are created as Private. They are also set to unlaunched.
  • When a user has an unverified email address and an unlaunched site, they are able publish content and import sites but they can't change their privacy settings.

Testing instructions

  • Apply this patch to your sandbox: D19586-code.
  • Open an incognito window
  • Create a new site and account at http://calypso.localhost:3000/start
  • Verify that you are not able to publish posts or pages, or import anything but you are able to change your privacy settings
  • Verify that you do not see a "launch banner" on the front end of your site
  • Create a new site at http://calypso.localhost:3000/start/private
  • Verify that you ARE able to publish posts or pages, and import, but you are NOT able to change your privacy settings
  • Verify that you DO see a "launch banner" on the front end of your site
  • Verify your email address
  • Now you should be able to publish content and import on both sites, and change your privacy settings
  • You should still see a "launch site" banner on the front of the site created at /start/developer.

@matticbot
Copy link
Contributor

@scruffian scruffian added [Status] In Progress [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Oct 19, 2018
@scruffian scruffian self-assigned this Oct 19, 2018
if ( this.props.isUnlaunchedSite ) {
if ( this.props.needsVerification ) {
return (
<EmailVerificationGate>
Copy link
Member Author

Choose a reason for hiding this comment

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

Might be worth setting a different notice text

@scruffian
Copy link
Member Author

@scruffian scruffian changed the title Add/unlaunched sites Add support for unlaunched private sites Oct 19, 2018
} = this.props;

return (
<>
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL Fragment shorthand

Copy link
Contributor

@mattwiebe mattwiebe left a comment

Choose a reason for hiding this comment

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

The code looks fine and tests properly according to your criteria, but I'm still wondering about the TODOs in a couple of places.

Looks like it's still supposed to get some site launching capability?

@scruffian
Copy link
Member Author

Looks like it's still supposed to get some site launching capability?

Yeah I'll add that in a new PR

@scruffian scruffian merged commit d509e40 into master Oct 23, 2018
@scruffian scruffian deleted the add/unlaunched-sites branch October 23, 2018 11:11
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Oct 23, 2018
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.

3 participants