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

Redirect the user to the login page if activation links fails #648

Open
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@ChristianGiupponi
Contributor

ChristianGiupponi commented Nov 7, 2018

Since you can create user manually even if you close the registrations route the activation method can't redirect user to the registration page if the activation fails.
This will redirect the user to the login page with the error message, if a user has the activation links there is no needs to redirect it to the register page, we can assume that a registration has already been placed by it or an admin.

This refers to the slack issue: https://asgardcms.slack.com/archives/C043NPXKQ/p1541472151008300

ChristianGiupponi and others added some commits Nov 7, 2018

Merge pull request #2 from AsgardCms/master
Merge from AsgardCMS
Christian Giupponi
Since the construct is executed before the middlewares, this will pre…
…vent the bootWidgets() from being executed before the permissions checks
Christian Giupponi
Since you can create user manually even if you close the registration…
…s route the activation method can't redirect user to the registration page if the activation fails.

This will redirect the user to the login page with the error message, if a user has the activation links there is no needs to redirect it to the register page, we can assume that a registration has already been placed by it or an admin
@nWidart

This comment has been minimized.

Member

nWidart commented Nov 7, 2018

I'm not sure it's ok to always redirect to login.

Maybe conditionally redirect to login or register based on that setting. It would make the code less 'clean' but extracting that in a method could help it.

Also please don't include commits of your other PR here.

@ChristianGiupponi

This comment has been minimized.

Contributor

ChristianGiupponi commented Nov 7, 2018

Yeah, my bad with the commit, I was sure I was on other branch for the first one.
What is the advantage of redirecting to the registration page?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment