CodeIgniter Forums

Full Version: ACL Filter with Matched Route Name
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, all!

I'm trying to create an Access Control List using a Controller Filter.

I want to check the permissions based on the Route Name. Because the URI could be updated and this would not affect the Permissions.

I ran the code and did not find a practical way to get the name of the current route (name and not URI).

Any suggestion?



Thank you in advance.
Can you use the url_helpers current_url() method to get what you need?
(01-28-2018, 05:30 AM)InsiteFX Wrote: [ -> ]Can you use the url_helpers current_url() method to get what you need?

Hi, InsiteFX. This could be possible, but I was thinking about to can change the uri's without need update all the files.

Then the first thought was about using the Route Name because I'm using the route_to() with named routes to create URL's.

I opened a PR for this. I think can be useful.
I also think that it would be very useful.