Skip to content

fix: preserve escape hatch through login redirect#179

Merged
field123 merged 1 commit intomasterfrom
fix/dashboard-escape-hatch-continueto
Mar 9, 2026
Merged

fix: preserve escape hatch through login redirect#179
field123 merged 1 commit intomasterfrom
fix/dashboard-escape-hatch-continueto

Conversation

@field123
Copy link
Collaborator

@field123 field123 commented Mar 9, 2026

Summary

  • The ?adminDashboard=true override param was lost when unauthenticated users hit the dashboard lockdown — the redirect to /login encoded it inside continueTo (/login?continueTo=%2F%3FadminDashboard%3Dtrue) where hasEscapeHatch() couldn't find it
  • hasEscapeHatch now also checks inside the continueTo query param for the escape hatch
  • 3 new test cases covering the continueTo scenario (28 total, all passing)

Test plan

  • Unit tests: yarn test --testPathPattern dashboard-restriction — 28/28 pass
  • Manual: visit https://integration.storefront.elasticpath.com/?adminDashboard=true while logged out and confirm you reach the login page instead of being redirected to Commerce Manager
  • Manual: after logging in via the continueTo redirect, confirm the dashboard is accessible

The adminDashboard=true override was lost when unauthenticated users
were redirected to /login — the param got encoded inside continueTo
rather than remaining a top-level query param. hasEscapeHatch now also
checks inside continueTo.
@field123 field123 merged commit 5cf1f5d into master Mar 9, 2026
7 checks passed
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.

1 participant