-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
By default redirect to post index page after login #435
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
Conversation
|
Looks like in this case, users, which don't have access to the admin page, will have an "Access denied" error. |
|
@bocharsky-bw you're right, but actually already happening, at least the most of times, the users accessing to login page through "browser backend" button and they get a "Access Denied" (and it makes sense if it was your intention). Something like "redirect to post index for users" or "redirect to admin index for admins" would be the best approach. Any suggestion to improving it? |
|
@yceruto if you want to do it, you need to create a dedicated route (used as target path) for which the controller would do redirections conditionally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm divided about this proposal. If we do this right, we must create a listener to redirect to the best page depending on each user ... but that may be a bit overkill for this demo app.
Should we go all in for the listener ... or abandon this idea? Thanks!
I'm agree that @stof's and @javiereguiluz's solution may be a bit overkill for this demo app and I abandon this idea. But, my initial goal here was to find a better When the user access to login page directly (i.e. through URL) then this option ( So, to make it simpler and to avoid "Access denied" for users, I've changed again the What do you think now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…uto, javiereguiluz) This PR was merged into the master branch. Discussion ---------- By default redirect to post index page after login This PR change the default target path `/` to <del>`admin_index`</del> `blog_index` route, useful when we access to login page directly (i.e. through URL). Commits ------- 09e2c64 Improved the help note 283d838 Expanded the help note about default_target_path 0b753ab By default redirect to post index page after login
This PR change the default target path
/toadmin_indexblog_indexroute, useful when we access to login page directly (i.e. through URL).