Skip to content

Ensure to delete preview sites only when the user is authenticated - #1641

Merged
ivan-ottinger merged 1 commit into
trunkfrom
add/isAuthenticated-check-for-preview-sites-deletion-during-site-deletion
Aug 6, 2025
Merged

Ensure to delete preview sites only when the user is authenticated#1641
ivan-ottinger merged 1 commit into
trunkfrom
add/isAuthenticated-check-for-preview-sites-deletion-during-site-deletion

Conversation

@ivan-ottinger

Copy link
Copy Markdown
Contributor

Related issues

Proposed Changes

  • ensure to delete preview sites only when the user is authenticated

Testing Instructions

  1. Check out the PR branch and build the app with npm start.
  2. Create a preview site for one of your local Studio sites.
  3. Check the current number of preview sites in the Settings → Usage tab.
  4. Log out from WordPress.com.
  5. Try to delete that local site that has preview site linked to it.
  6. The local site should get deleted without any error message.
  7. When you check the Settings → Usage tab, the number of preview sites should not be reduced - as the site has not been deleted.
  8. Repeat the steps 2 and 3.
  9. Go offline (e.g. by deactivating wifi).
  10. Repeat the steps 5 to 7.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@ivan-ottinger ivan-ottinger self-assigned this Aug 6, 2025
@ivan-ottinger
ivan-ottinger requested a review from a team August 6, 2025 09:51

@gcsecsey gcsecsey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks Ivan for quickly creating a fix! This works well and the changes LGTM!

Deleting the site while logged out:

CleanShot.2025-08-06.at.11.06.05.mp4

Deleting the site while offline:

CleanShot.2025-08-06.at.11.09.38.mp4
@ivan-ottinger
ivan-ottinger merged commit d8c8dba into trunk Aug 6, 2025
12 checks passed
@ivan-ottinger
ivan-ottinger deleted the add/isAuthenticated-check-for-preview-sites-deletion-during-site-deletion branch August 6, 2025 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants