Welcome Guest, Not a member yet? Register   Sign In
ACL Filter with Matched Route Name
#1
Question 

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.
Reply
#2

Can you use the url_helpers current_url() method to get what you need?
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(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.
Reply
#4

I also think that it would be very useful.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB