Closed mmuruev closed 10 years ago
@mmuruev not that I'm aware of, you'll want to setup access rules for that
Yes, I know about access rules. This is not the same. In that case module even doesn't bind to url just as not loaded. Also access rules are weird thing. I can do only allow access but not restrict for url, also if you have few quite the same path it surprise even more. Any way I'm looking exactly for mount by roles.
That's not possible as the security runs after the routing.
I want make mount my silex modules by security role. Issue is that security context available only on controller call, but mount should call much earlier. Is this possible? I want have something like if($app['security']->isGranted('ROLE_ADMIN')){ $app->mount($class::ROUTE, new $class()); // Only admin available module }