Skip to content

Auth: signed-in non-admins land on /account (dashboard), not the public home - #324

Open
WebTigers wants to merge 1 commit into
mainfrom
fix/login-dashboard-redirect
Open

WebTigers wants to merge 1 commit into
mainfrom
fix/login-dashboard-redirect

Conversation

@WebTigers

Copy link
Copy Markdown
Owner

What

AuthController::_roleHome() sends admin roles → /admin and everyone else → /account (was /).

Why

An authenticated user should land on a dashboard, not the public home. Since the CMS home-page
selector (1.16.0) can point / at any theme's landing page, a signed-in non-admin was being dropped on
the marketing/landing page after login (e.g. a leftover @theme:grey-mist home). /account
(core/controllers/AccountController.php — "the authenticated NON-admin home, My Account") is the
proper destination; guests still see /.

Applies to both redirect paths that use _roleHome — the already-signed-in GET redirect and the
successful-login JSON redirect.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ASauLLscjqdsNqBNsx2Typ

…ic home

An authenticated user should land on a dashboard, not the public marketing/home page. _roleHome
already sends admin roles to /admin; it was sending everyone else to '/' (the public home — which,
with the CMS home-page selector pointing / at a theme page, is whatever marketing/landing is set).
Non-admin authenticated users now land on /account (the "My Account" dashboard, AccountController) —
guests still see '/'. Fixes a signed-in `user` being dropped on the public home after login.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ASauLLscjqdsNqBNsx2Typ
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