-
Notifications
You must be signed in to change notification settings - Fork 133
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
fix: unauthorized users for groups and permissions are not redirected to the previous url #799
fix: unauthorized users for groups and permissions are not redirected to the previous url #799
Conversation
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 am on mobile. I did not check the issue practically.
But the explanation and how to implement it seems logical.
Thanks @datamweb. Feel free to check when you can. |
The option for adding arguments to filter configuration has been added to CI v4.4.0, see docs. This PR might need to be updated to either:
WDYT? |
Yes, I remembered, I had reviewed this one😀.
Shield requires CodeIgniter 4.2.7+ at this point I am not very inclined to upgrade to 4.4.0. |
Hi @kenjis, @lonnieezell, @MGatner can you take a look? |
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.
LGTM!
@sammyskills is aware of this, I haven't played with the code yet, I'll try to do it tomorrow. |
$session = session(); | ||
$session->setTempdata('beforeLoginUrl', current_url(), 300); |
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 just came up with this code, but it is a copy and paste.
Since it is the same knowledge (save the URL for 300 seconds in the session), it might be better to put it together in a method if possible.
But there doesn't seem to be an appropriate class to put it in 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.
Yes, I'm currently merge this. Maybe we can refactor later.
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.
@sammyskills I came back after a million days 😃. Sorry.
Thank you!
Fixes #798