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

Guided Tour: Redirect to Login page if logged out #25498

Merged
merged 2 commits into from
Jun 14, 2018

Commits on Jun 14, 2018

  1. Framework: Redirect to Login page if logged out

    When you hit a valid route as a logged-out user, we should send you to the login page with a redirect back to the page you were trying to access. This is how all wp-admin links in core WP works.
    
    There have been fixes for individual pages (eg #24687 ) but this should be handled at the framework level. We have an email campaign using the Simple Payments Guided Tour #24627 and it freezes at a blank screen for a logged-out user.
    
    What this change does is to do a redirect for a valid section with the `enableLoggedOut` property set to true to the login screen with a redirect. A future PR could probably remove all bespoke uses of `import { redirectLoggedOut } from 'controller'` as well since this should supersede it.
    mattwiebe committed Jun 14, 2018
    Configuration menu
    Copy the full SHA
    66488b2 View commit details
    Browse the repository at this point in the history
  2. More selective redirect to not break signup

    This is only trying to fix the `stats` route. The previous change broke signup and other critical views that begin logged-out. This will simply fix the Guided Tour.
    mattwiebe committed Jun 14, 2018
    Configuration menu
    Copy the full SHA
    b520b9e View commit details
    Browse the repository at this point in the history