-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
Re-work the filters & Set the route name for routing in config #444
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.
See my comment on the issue, but this should be refactored with url_is()
and route_to()
, not relying on the App Config directly.
hang in there |
I removed the |
use `uri_string()` to get the string from current url
I use `current_url()` and at line 51 I add an extra script in case if user use index.php :)
if we use the CI version start from v4.0.5 the function url_is() is available, but if we end the support for < v4.0.5 I can just use url_is() |
NOTE : Since url_is() is available start from CodeIgniter 4.0.5, user must update their application.
now we can use login filter in global :) |
I remove the helper('auth) since it's no use in there (performance reason) and put the session check at the begin of code, because we need a session data right?
Looking better! A few changes. Also please be sure to run the style fixer. |
Wait for a moment, I'll fix it |
How about this PR @MGatner ? Any suggestion for the code position? |
It's too bulky for me to do on mobile, been waiting for a chance on desktop! From what I can see it looks right. I also want to check why tests are failing - I think it is unrelated to this PR. |
Okay, I hope it'll fix soon |
Hello @MGatner how the PHPStan's status? Still not working? |
The PHPStan issues aren't related to this PR - probably an update to the tool itself caused this. I'm good with this change! @lonnieezell last look? |
@MGatner I am happy to hear that :) |
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.
Okay I made a proper review this time! A few suggestions to clean up and make this a legit refactor 😉
Thanks for the review, I will try to figure it :) it's funny, I just learned about abstract class and you give that suggestion 😂 |
I have no problems with this PR, I think. I agree with @MGatner latest comments so go ahead and address those, though. |
fix #453 |
I add defaultLandingRoute to store the default route name after user success to login (depend on the real case) or fail in Permission & Role Filters too
Any idea how I fail all the test :( @MGatner |
@mjamilasfihani This repos tests might be borked. I would like to switch the CI/CD to the new CodeIgniter Dev Kit which hopefully will be ready today or tomorrow. |
That's good. Anytime you can do it @MGatner |
Hi @mjamilasfihani - a 5-month hiatus, but I am almost ready to merge the DevKit updates. Are you around to rebase this and clean up any changes for a final review once #517 is in? |
Thanks @MGatner for the good news, I'm ready for this 🔥 |
…to lonnieezell-develop
Lonnieezell develop
The Routes.php now will use reserved routing from Auth.php
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.
This is looking good! Please add some tests. The framework now has the FilterTestTrait
which makes it easy to test filters.
Fix issue #443