Multi-level routing filters not working |
Good day!
I want restrict routing groups by shield permissions , but filter working only for parent group. In children groups permission filter not working. Where my bad? CI 4.5.5 \ Shield 1.1.0 PHP Code: $routes->group('admin', ['filter' => 'permission:admin.access'], static function (RouteCollection $routes) { // permission:admin.access is working Code: For this to work you have to enable multiple filters in Config/Feature.php PHP Code: public bool $multipleFilters = true; What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(11-28-2024, 09:55 PM)InsiteFX Wrote: It's not work for me, and search by multipleFilters in project or vendor directory not founding any using for this parameter. Maybe there are any other ideas? Or is there something wrong with my configuration in principle?
!Important
Since v4.5.0, Multiple Filters are always enabled. Prior to v4.5.0, Multiple Filters were disabled by default. If you want to use with prior to v4.5.0, See Upgrading from 4.1.4 to 4.1.5 for the details. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(11-29-2024, 10:29 PM)InsiteFX Wrote: !Important Yep, but i created project from v4.5.0, now 4.5.5 and filters for nested routing groups does not work.
If you think there is a problem then open up an issue on GitHub for it.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
See in console or test controller command():
spark routes spark filter:check /users https://codeigniter.com/user_guide/incom...lter-check (12-01-2024, 09:26 PM)ozornick Wrote: See in console or test controller command(): spark routes Code: CodeIgniter v4.5.5 Command Line Tool - Server Time: 2024-12-02 11:47:12 UTC+00:00 and check Code: php spark filter:check GET /admin/users/ |
Welcome Guest, Not a member yet? Register Sign In |